Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


- - - - -

Bug in tokenizer on 64-bit?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 DaBono   Members   -  Reputation: 1023

Like
0Likes
Like

Posted 06 March 2008 - 09:18 AM

I think I just ran into a bug in as_tokenizer.cpp. In line 118 (in 2.11.2), a loop is run on every character of the whitespace-string. The length of this string is determined by doing:
for( int w = 0; w < (int)sizeof(whiteSpace); w++ )


However, sizeof(whiteSpace) seems to give the size of the pointer to the string, which on 32-bit is 4 and incidentally correct. On 64-bit however, this becomes 8, which leads to all kinds of weird errors. Changing the line to
for( int w = 0; w < 4; w++ )


fixed these problems for me. [Edited by - DaBono on March 6, 2008 3:37:16 PM]

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3452

Like
0Likes
Like

Posted 06 March 2008 - 01:51 PM

Thanks DaBono, you're right it is indeed a bug. Instead of sizeof it should have been strlen.

I'll fix this for the next release.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS