Skip to content

Commit 3aca411

Browse files
committed
ignore touch events that do not correspond to a tracked touch; fixes BananaBread crashes
1 parent cc8909a commit 3aca411

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/library_sdl.js

+1
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ var LibrarySDL = {
789789
}
790790
case 'touchstart': case 'touchend': case 'touchmove': {
791791
var touch = event.touch;
792+
if (!Browser.touches[touch.identifier]) break;
792793
var w = Module['canvas'].width;
793794
var h = Module['canvas'].height;
794795
var x = Browser.touches[touch.identifier].x / w;

0 commit comments

Comments
 (0)