[Scummvm-git-logs] scummvm master -> 2e5ff9b5b2d9bedc46c5f4fea65d60c4331ea691

sev- noreply at scummvm.org
Mon Oct 21 14:58:28 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2e5ff9b5b2 CRAB: Fix potential integer overflow. CID 1552034


Commit: 2e5ff9b5b2d9bedc46c5f4fea65d60c4331ea691
    https://github.com/scummvm/scummvm/commit/2e5ff9b5b2d9bedc46c5f4fea65d60c4331ea691
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-21T16:57:15+02:00

Commit Message:
CRAB: Fix potential integer overflow. CID 1552034

Changed paths:
    engines/crab/ui/menu.h


diff --git a/engines/crab/ui/menu.h b/engines/crab/ui/menu.h
index 61cb7d339f3..4dfcd6aab2b 100644
--- a/engines/crab/ui/menu.h
+++ b/engines/crab/ui/menu.h
@@ -108,6 +108,9 @@ protected:
 				if ((int)_path[curpos] == _hoverIndex)
 					break;
 
+			if (curpos == 0)
+				return;			// There is no previous element
+
 			int nextloc = curpos - 1;
 			while (nextloc != (int)curpos) {
 				if (nextloc < 0)




More information about the Scummvm-git-logs mailing list