GameMonkey Script

GameMonkey Script Forums
It is currently Mon Mar 18, 2019 8:01 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jan 19, 2004 8:41 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
There is a bug in the string 'operator not' in GM versions including 1.1.

The function returns true instead of false. The correct code in gmOperators.cpp should be:

Code:
void GM_CDECL gmStringOpNOT(gmThread * a_thread, gmVariable * a_operands)
{
  a_operands->m_value.m_int = 0; a_operands->m_type = GM_INT;
}


Example script to demonstrate bug:
Code:
a = "apple";
if (!a)
{
  print("!a");  // This should not display but does
}


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group