diff --git a/changelog.txt b/changelog.txt index 0416945e71..4a3d986028 100644 --- a/changelog.txt +++ b/changelog.txt @@ -111,7 +111,7 @@ Version 0.91.0: - fbc crashed after showing the error message when using -vec 1|2 without -fpu sse - ASM backend: Sgn(LongInt) returned wrong values - C backend: Extern "Windows-MS" is now supported, including DLL exports (stdcall procedures without @N suffix) - +- #709: format() adds erroneous thousands delimiter, was affecting all number strings that were multiple of 3. Version 0.90.1: diff --git a/src/rtlib/str_format.c b/src/rtlib/str_format.c index 2fbc9b00b2..0a0f3d198f 100644 --- a/src/rtlib/str_format.c +++ b/src/rtlib/str_format.c @@ -453,7 +453,7 @@ int fb_hProcessMask DBG_ASSERT( IndexFix!=LenFix ); pszAdd = FixPart + IndexFix; if( pInfo->has_thousand_sep ) { - int remaining = LenFix - IndexFix; + int remaining = LenFix - IndexFix - 1; if( (remaining % 3)==0 ) { if( did_thousandsep ) { did_thousandsep = FALSE;