Re: string length on Mac

Jeroen van der Zijp <[email protected]> Tue, 16 Apr 2024 17:04:23 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization FOX Toolkit
Message-ID <[email protected]>
On Tue, 16 Apr 2024 17:20:41 -0400
"John Selverian" <[email protected]> wrote:

> My program is crashing on start-up on the Mac.  It works fine on
> Windows and Linux. I can't catch it in the debugger, it crashes
> in FXString::length() in the fox lib. I have some long strings
> (up to 2000 chars). Could this be the problem? Is there a length
> limit for FXString?

Length limit is, basically, MAX_INT (2**31-1).  Why does it
crash?  I don't know.  I assume you've at least executed the
FXString constructor?  FXString is essentially a pointer to
a text buffer, preceded by the size of the string [there's 
an extra byte at the end, not accounted for in the length].

An empty string is a special pointer, which is preceeded by
a count of 0, and whose contents is a single end-of-string
character ('\0').




    -- JVZ