(quotearg_buffer_restyled): Fix off-by-two bug in trigraph handling.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Nov 2002 07:03:53 +0000 (07:03 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Nov 2002 07:03:53 +0000 (07:03 +0000)
lib/quotearg.c

index 79929e7..750426c 100644 (file)
@@ -330,8 +330,8 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
                  case '<': case '=': case '>':
                    /* Escape the second '?' in what would otherwise be
                       a trigraph.  */
-                   i += 2;
                    c = arg[i + 2];
+                   i += 2;
                    STORE ('?');
                    STORE ('\\');
                    STORE ('?');