mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-06 00:57:24 +02:00
realloc() to the correct string.
Someone had mistyped the destination of the realloc. It should have been the original string not the input buffer.
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Stephen Williams ([email protected])
|
||||
* Copyright (c) 2006-2010 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -121,7 +121,7 @@ static double float_string(struct byte_source*src)
|
||||
}
|
||||
|
||||
while (isdigit(ch)) {
|
||||
src = realloc(str, len+2);
|
||||
str = realloc(str, len+2);
|
||||
str[len++] = ch;
|
||||
ch = byte_getc(src);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user