@@ -142,7 +142,7 @@ FBSTRING *fb_hBuildDouble
142142 LenTotal = LenSign + LenFix + LenDecPoint + LenFrac ;
143143
144144 /* alloc temp string */
145- dst = fb_hStrAllocTemp_NoLock ( NULL , LenTotal );
145+ dst = fb_hStrAllocTemp ( NULL , LenTotal );
146146 if ( dst != NULL )
147147 {
148148 if ( LenSign != 0 ) {
@@ -1154,6 +1154,7 @@ FBCALL FBSTRING *fb_hStrFormat
11541154
11551155 fb_ErrorSetNum ( FB_RTERROR_OK );
11561156
1157+ /* Lock to prevent inconsistent results if fb_I18nSet() called? */
11571158 FB_LOCK ();
11581159 pszIntlResult = fb_IntlGet ( eFIL_NumDecimalPoint , FALSE );
11591160 chDecimalPoint = (( pszIntlResult == NULL ) ? '.' : * pszIntlResult );
@@ -1170,8 +1171,6 @@ FBCALL FBSTRING *fb_hStrFormat
11701171 if ( chThousandsSep == 0 )
11711172 chThousandsSep = ',' ;
11721173
1173- FB_STRLOCK ();
1174-
11751174 if ( mask == NULL || mask_length == 0 )
11761175 {
11771176 dst = fb_hBuildDouble ( value , chDecimalPoint , 0 );
@@ -1187,7 +1186,7 @@ FBCALL FBSTRING *fb_hStrFormat
11871186 chThousandsSep , chDecimalPoint ,
11881187 chDateSep , chTimeSep ) )
11891188 {
1190- dst = fb_hStrAllocTemp_NoLock ( NULL , info .length_min + info .length_opt );
1189+ dst = fb_hStrAllocTemp ( NULL , info .length_min + info .length_opt );
11911190 if ( dst == NULL )
11921191 {
11931192 fb_ErrorSetNum ( FB_RTERROR_OUTOFMEM );
@@ -1205,8 +1204,6 @@ FBCALL FBSTRING *fb_hStrFormat
12051204 }
12061205 }
12071206
1208- FB_STRUNLOCK ();
1209-
12101207 return dst ;
12111208}
12121209
0 commit comments