remove useless test, fgets() already ensures MAX_STRING_LEN
Found by PVS-Studio - https://www.viva64.com/en/b/0540/
This commit is contained in:
parent
2fec64f0bd
commit
1a46ee716d
@ -259,14 +259,14 @@ read_string (FILE *fp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strlen (buf) < MAX_STRING_LEN) {
|
||||
if (strlen (buf)) {
|
||||
buf[strlen (buf)-1] = 0;
|
||||
}
|
||||
if (strlen (buf)) {
|
||||
/* strip lash char here: '\n',
|
||||
* since VST-params cannot be longer than 127 chars.
|
||||
*/
|
||||
buf[strlen (buf)-1] = 0;
|
||||
return strdup (buf);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Read an integer value from a line in fp into n,
|
||||
|
Loading…
Reference in New Issue
Block a user