Browse Source

Don't write past '\0', fixes a bug in commit

1c5e0d11d ("If there is a XSPICE code model .model line with
file input, keep quotes and case for the file path.", 2021-07-15)
pre-master-46
Holger Vogt 5 years ago
parent
commit
9cc9c56cad
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -2664,6 +2664,8 @@ void inp_casefix(char *string)
string++;
if (*string)
string++; // past second quote
if (*string == '\0')
break;
}
#endif
if (*string == '"') {
@ -2675,7 +2677,7 @@ void inp_casefix(char *string)
if (*string == '"')
*string = ' ';
}
if (!isspace_c(*string) && !isprint_c(*string))
if (*string && !isspace_c(*string) && !isprint_c(*string))
*string = '_';
if (isupper_c(*string))
*string = tolower_c(*string);

Loading…
Cancel
Save