Mantis

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0018963GameMaker Runner[All Projects] HTML5Public2015-09-27 20:422016-08-23 13:38
Reporterrcusumano 
Assigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
StatusClosedResolutionFixed 
PlatformOSOS Version
Summary0018963: HTML5: Using !true as array index does not address position 0
DescriptionIf you negate true and try to use that as an array index it doesn't do anything instead of addressing to position 0 of the array. You have to use 1-true to get 0.

var a=1,b;
b[0]='no keks'
b[!a]='keks'
show_message(b[0])

you get no keks.
GM Version1.4.1657
Attached Files

- Relationships

-  Notes
(0043125)
rcusumano (Updater)
2016-04-27 18:41

0019983
0019982
0020914
0020812
0020553

all these bugs are the same problem - runner incorrectly treating booleans
(0043963)
Russell Kay (Manager)
2016-06-14 20:47

OK technically this is undefined behaviour in GML as the array index should be a number and not a boolean I will check to see what the HTML5 compiler is doing here as it should convert the boolean to an integer... but the premise is dodgy in the first place
(0043965)
Russell Kay (Manager)
2016-06-14 20:56

Fixed in gitlab 62b7f44
(0044225)
Stewart Bishop (Administrator)
2016-06-23 14:55

Confirming this now works as expected.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker