[ wxwindows-Bugs-1721643 ] wxStrtod() will always return zero

SourceForge.net noreply at sourceforge.net
Thu Jun 21 04:52:46 PDT 2007


Bugs item #1721643, was opened at 2007-05-19 06:05
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1721643&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMac specific
Group: Platform specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Leland Lucius (llucius)
Assigned to: Stefan Csomor (csomor)
Summary: wxStrtod() will always return zero

Initial Comment:
Near as I can tell, the only affect Mac OSX version 10.2 and older.  The routine counts the digits of the number and then uses the O/S strtod() to convert the number.

Unfortuantely, the pointer that gets passed to the strod() function is pointing to the final null terminator of the input string, so nothing ever gets converted.

The line is error in wxchar.cpp is:

  wxString data(nptr, nptr-start);

This should probably be changed to:

  wxString data(start, nptr-start);

Leland


----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-06-21 13:52

Message:
Logged In: YES 
user_id=71618
Originator: NO

I've fixed it in 2.8 branch as suggested but in HEAD this code doesn't
exist any more as OS X 10.2 is not supported (10.3.something or later is
required).

Thanks for your report!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1721643&group_id=9863




More information about the wx-dev mailing list