main_gui.c
changeset 813 90d6adb8d4ad
parent 793 0fbdcb357a2c
child 815 633faa72f094
--- a/main_gui.c	Mon Dec 27 18:18:44 2004 +0000
+++ b/main_gui.c	Tue Dec 28 09:24:02 2004 +0000
@@ -87,6 +87,9 @@
 		// Give money
 		int32 money = atoi(e->edittext.str) / GetCurrentCurrencyRate();
 		char msg[100];
+
+		money = clamp(money, 0, 0xFFFFFFFF); // Clamp between 4 billion and 0
+
 		// Give 'id' the money, and substract it from ourself
 		if (!DoCommandP(0, money, id, NULL, CMD_GIVE_MONEY)) break;