tunnelbridge_cmd.c
changeset 2934 3b7eef9871f8
parent 2931 d9e2973a110f
child 2951 2db3adee7736
child 9936 53d4d464b85c
--- a/tunnelbridge_cmd.c	Mon Jan 30 16:58:05 2006 +0000
+++ b/tunnelbridge_cmd.c	Mon Jan 30 17:18:45 2006 +0000
@@ -209,7 +209,7 @@
 	bridge_type = GB(p2, 0, 8);
 	railtype    = GB(p2, 8, 8);
 
-	if (p1 > MapSize()) return CMD_ERROR;
+	if (p1 >= MapSize()) return CMD_ERROR;
 
 	// type of bridge
 	if (HASBIT(railtype, 7)) { // bit 15 of original p2 param