diff options
Diffstat (limited to 'src/preproc/html/pushbackbuffer.cc')
-rwxr-xr-x | src/preproc/html/pushbackbuffer.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/preproc/html/pushbackbuffer.cc b/src/preproc/html/pushbackbuffer.cc index 4bea4516..71f6fcd2 100755 --- a/src/preproc/html/pushbackbuffer.cc +++ b/src/preproc/html/pushbackbuffer.cc @@ -292,20 +292,15 @@ static float convertToFloat (int a, int b) float pushBackBuffer::readNumber (void) { - int integer; - int fraction; + int i; char ch; - float f; - integer = readInt(); - if (putPB(getPB()) == '.') { - ch = getPB(); - fraction = readInt(); - f = convertToFloat(integer, fraction); - return( f ); - } else { - return( (float)integer ); + i = readInt(); + if ((ch = getPB()) == '.') { + return convertToFloat(i, readInt()); } + putPB(ch); + return (float)i; } /* |