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++;
|
string++;
|
||||||
if (*string)
|
if (*string)
|
||||||
string++; // past second quote
|
string++; // past second quote
|
||||||
|
if (*string == '\0')
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (*string == '"') {
|
if (*string == '"') {
|
||||||
|
|
@ -2675,7 +2677,7 @@ void inp_casefix(char *string)
|
||||||
if (*string == '"')
|
if (*string == '"')
|
||||||
*string = ' ';
|
*string = ' ';
|
||||||
}
|
}
|
||||||
if (!isspace_c(*string) && !isprint_c(*string))
|
if (*string && !isspace_c(*string) && !isprint_c(*string))
|
||||||
*string = '_';
|
*string = '_';
|
||||||
if (isupper_c(*string))
|
if (isupper_c(*string))
|
||||||
*string = tolower_c(*string);
|
*string = tolower_c(*string);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue