]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/json.c: Comment correction
authorMattias EngdegÄrd <mattiase@acm.org>
Thu, 4 Apr 2024 13:48:09 +0000 (15:48 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 5 Apr 2024 12:11:44 +0000 (14:11 +0200)
(cherry picked from commit 4a74999a735d9c0980d119dedf266ac2035e3ae9)

src/json.c

index 702350b1b0954c0676160ca7008f00e2c93e2be7..140c3625d4d7322a9e63705099a3ac862fcfe292 100644 (file)
@@ -1055,7 +1055,7 @@ json_parse_string (struct json_parser *parser, bool intern, bool leading_colon)
   json_byte_workspace_reset (parser);
   if (leading_colon)
     json_byte_workspace_put (parser, ':');
-  ptrdiff_t chars_delta = 0;   /* nchars - nbytes */
+  ptrdiff_t chars_delta = 0;   /* nbytes - nchars */
   for (;;)
     {
       /* This if is only here for a possible speedup.  If there are 4
@@ -1105,7 +1105,7 @@ json_parse_string (struct json_parser *parser, bool intern, bool leading_colon)
       if (c & 0x80)
        {
          /* Parse UTF-8, strictly.  This is the correct thing to do
-            whether or not the input is a unibyte or multibyte string.  */
+            whether the input is a unibyte or multibyte string.  */
          json_byte_workspace_put (parser, c);
          unsigned char c1 = json_input_get (parser);
          if ((c1 & 0xc0) != 0x80)