Co-Authored-By: Lew Rossman <LRossman@outlook.com>
This commit is contained in:
Marios S. Kyriakou
2024-08-01 22:45:42 +03:00
parent b16dacb87e
commit 3604f3f693

View File

@@ -4526,6 +4526,7 @@ int DLLEXPORT EN_loadpatternfile(EN_Project p, const char *filename, const char
{
FILE *file;
char line[MAXLINE+1];
char *tok;
int err = 0;
int i;
int len = 0;
@@ -4552,7 +4553,9 @@ int DLLEXPORT EN_loadpatternfile(EN_Project p, const char *filename, const char
while (fgets(line, sizeof(line), file) != NULL) {
// Skip lines that don't contain valid numbers
if (!getfloat(line, &value)) continue;
tok = strtok(line, SEPSTR);
if (tok == NULL) continue;
if (!getfloat(tok, &value)) continue;
// Resize multiplier array if it's full
if (len % CHUNK == 0) {