Skip to content

Commit

Permalink
[CWEB] The loops must terminate.
Browse files Browse the repository at this point in the history
Read all digits from user input.

git-svn-id: svn://tug.org/texlive/trunk/Build/source@67860 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Aug 9, 2023
1 parent 10fff1d commit 7dc3e35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctwill-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,8 @@ new_meaning(
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|@>@;
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/cweave.w
Original file line number Diff line number Diff line change
Expand Up @@ -4241,8 +4241,8 @@ else {
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;
Expand Down

0 comments on commit 7dc3e35

Please sign in to comment.