Merge pull request #3 from ksherlock/ub1

Fix undefined behavior
This commit is contained in:
MikeW50 2018-03-25 15:32:37 -06:00 committed by GitHub
commit fae158fa17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1728,8 +1728,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;