texlive[67860] Build/source/texk/web2c/cwebdir: [CWEB] The loops must

commits+ascherer at tug.org commits+ascherer at tug.org
Wed Aug 9 16:19:34 CEST 2023


Revision: 67860
          http://tug.org/svn/texlive?view=revision&revision=67860
Author:   ascherer
Date:     2023-08-09 16:19:34 +0200 (Wed, 09 Aug 2023)
Log Message:
-----------
[CWEB] The loops must terminate.

Read all digits from user input.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweave.w

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-08-09 12:46:32 UTC (rev 67859)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-08-09 14:19:34 UTC (rev 67860)
@@ -1555,8 +1555,8 @@
     name_pointer p=id_lookup(first,loc-1,normal);
     sixteen_bits t=title_lookup();
     if (*(loc-1)=='}')
-      while (xisdigit(*loc))@^system dependencies@>
-        if (n < INT_MAX / 10) n=10*n+(*loc++)-'0';
+      for (;xisdigit(*loc);loc++)@^system dependencies@>
+        if (n < INT_MAX / 10) n=10*n+(*loc)-'0';
     if (*loc++!=' ')
       err_print(_("! Location in meaning should be followed by space"));
     else @<Digest the meaning of |p|, |t|, |n|@>@;

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-08-09 12:46:32 UTC (rev 67859)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-08-09 14:19:34 UTC (rev 67860)
@@ -4241,8 +4241,8 @@
     loc++;
   }
   else {
-    sec_depth=0; while (xisdigit(*loc))@^system dependencies@>
-      if (sec_depth < INT_MAX / 10) sec_depth = sec_depth*10 + (*loc++) -'0';
+    for (sec_depth=0; xisdigit(*loc);loc++)@^system dependencies@>
+      if (sec_depth < INT_MAX / 10) sec_depth = sec_depth*10 + (*loc) -'0';
   }
   while (*loc == ' ') loc++; /* remove spaces before group title */
   group_found=true;



More information about the tex-live-commits mailing list.