forked from github/verilator
Fix string-to-int space conversion, bug931.
This commit is contained in:
parent
7578ef889f
commit
6c5884853f
2
Changes
2
Changes
@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
**** Fix .c files to be treated as .cpp, bug930. [Jonathon Donaldson]
|
||||
|
||||
**** Fix string-to-int space conversion, bug931. [Fabrizio Ferrandi]
|
||||
|
||||
|
||||
* Verilator 3.874 2015-06-06
|
||||
|
||||
|
@ -708,8 +708,8 @@ void _VL_VINT_TO_STRING(int obits, char* destoutp, WDataInP sourcep) {
|
||||
start = false; // Drop leading 0s
|
||||
}
|
||||
}
|
||||
*destp++ = '\0'; // Terminate
|
||||
while (isspace(*(destp-1)) && destp>destoutp) *--destp = '\0'; // Drop trailing spaces
|
||||
*destp = '\0'; // Terminate
|
||||
if (!start) while (isspace(*(destp-1)) && destp>destoutp) *--destp = '\0'; // Drop trailing spaces
|
||||
}
|
||||
|
||||
void _VL_STRING_TO_VINT(int obits, void* destp, int srclen, const char* srcp) {
|
||||
|
Loading…
Reference in New Issue
Block a user