Skip to content

Commit ab5b9b1

Browse files
Fixes bug on layer_background_index function
The function was not correctly retrieving the max number of indices of the background sprite. References: YoYoGames/GameMaker-Bugs#4580
1 parent d044b9e commit ab5b9b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/functions/Function_Layers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ function layer_background_index( arg1,arg2)
25882588
if (el != null)
25892589
{
25902590
var image_index = yyGetInt32(arg2);
2591-
var max_index = sprite_get_number(el.m_pBackground.image_index);
2591+
var max_index = sprite_get_number(el.m_pBackground.index);
25922592

25932593
el.m_pBackground.image_index = fwrap(image_index, max_index);
25942594
}

0 commit comments

Comments
 (0)