URI:
       reverse a check to be safer - stagit-gopher - static git page generator for gopher
  HTML git clone https://git.drkhsh.at/stagit-gopher.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit c582e516fd9521466f553e16af7cf6185fdb0235
   DIR parent 326c0b91ac136447c1cb3f6cc2dc2053f320a5ee
  HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri, 23 Jun 2017 12:29:58 +0200
       
       reverse a check to be safer
       
       Diffstat:
         M stagit-gopher.c                     |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/stagit-gopher.c b/stagit-gopher.c
       @@ -470,7 +470,7 @@ writeblobgph(FILE *fp, const git_blob *blob)
                                        continue;
                                n++;
                                fprintf(fp, nfmt, n, n, n);
       -                        for (j = prev; s[j] && j <= i; j++) {
       +                        for (j = prev; j <= i && s[j]; j++) {
                                        switch (s[j]) {
                                        case '\r': break;
                                        case '\t': fputs("        ", fp); break;
       @@ -483,7 +483,7 @@ writeblobgph(FILE *fp, const git_blob *blob)
                        if ((len - prev) > 0) {
                                n++;
                                fprintf(fp, nfmt, n, n, n);
       -                        for (j = prev; s[j] && j < len - prev; j++) {
       +                        for (j = prev; j < len - prev && s[j]; j++) {
                                        switch (s[j]) {
                                        case '\r': break;
                                        case '\t': fputs("        ", fp); break;