Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | bug in sal/rtl/source/strtmpl.c | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | udk | Reporter: | Unknown <non-migrated> | ||||||
Component: | code | Assignee: | Stephan Bergmann <stephan.bergmann.secondary> | ||||||
Status: | CLOSED FIXED | QA Contact: | issues@udk <issues> | ||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | issues | ||||||
Version: | 638 | ||||||||
Target Milestone: | --- | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
Unknown
2002-01-25 19:11:08 UTC
Created attachment 988 [details]
Fix for issue: added a missing "else"
> diff -c strtmpl.c ~chanv/origoo/oo_638c_src/sal/rtl/source/strtmpl.c
*** strtmpl.c Fri Jan 25 14:10:30 2002
--- /usr/local/home/chanv/origoo/oo_638c_src/sal/rtl/source/strtmpl.c
Mon Jul 30 13:46:11 2001
***************
*** 1106,1112 ****
{
if ( bExp && (nExp != 0) )
break;
! else if ( fRet != 0.0 )
break;
}
/* Exponent separator */
--- 1106,1112 ----
{
if ( bExp && (nExp != 0) )
break;
! if ( fRet != 0.0 )
break;
}
/* Exponent separator */
Stephan, this seems to belong to you?! The proposed patch seems not to fix the bug (with or without the patch, lines 1106--1112 are equivalent to "if (bExp && nExp != 0 || fRet != 0.0) break;"), but I'll take care of the bug. The reason we found the problem is that errors were generated when running the test program in stoc/testconv which complains about converting a String such as "1.723847e+308" to double. We traced down the problem and found that the function in strtmpl.c only converts the string to "1.723847", the exponent part is gone. If we add the else part, it works fine. For some strange reason, adding just the else may not work. Consider this? else if ( *pStr == '+' ) { if ( bExp ) { if ( nExp != 0 ) break; } else { if ( fRet != 0.0 ) break; } } Thanks, Vicky Created attachment 1286 [details]
This patch is correct for this issue
Fixed this in the top-level branch (sal/rtl/source/strtmpl.c 1.11, sal/test/teststring.cxx 1.5). Vicky, Tim, after commiting the change I realized I did not give credit to you in the code. Sorry, it was an oversight (bit stressed right now). Verified that fix is in internal build UDK305C. Closing it... |