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)
This commit is contained in:
parent
b7473a33a0
commit
9cc9c56cad
|
|
@ -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…
Reference in New Issue