mirror of
https://github.com/byteworksinc/MakeLib.git
synced 2024-06-10 07:29:29 +00:00
Fix undefined behavior. With ORCA/C 2.2, this code generates an infinite loop. (essentially, name2[i+1] = toupper(name2[i]))
This commit is contained in:
parent
7fbe55dd87
commit
a0eaf0f741
|
@ -1718,8 +1718,10 @@ if (file) {
|
|||
while (f) {
|
||||
strcpy(name2, f->fName);
|
||||
i = 0;
|
||||
while (name2[i])
|
||||
name2[i] = toupper(name2[i++]);
|
||||
while (name2[i]) {
|
||||
name2[i] = toupper(name2[i]);
|
||||
++i;
|
||||
}
|
||||
if (! strcmp(name2, name))
|
||||
return f->fFile;
|
||||
f = f->fNext;
|
||||
|
|
Loading…
Reference in New Issue
Block a user