From 269b3e8bf2f4e2536a7c0830388df39942064958 Mon Sep 17 00:00:00 2001 From: SpaceViking Date: Mon, 15 Dec 2008 06:26:14 +0000 Subject: [PATCH] Only display 13 orders on shipment screen if there are more. More than 13 corrupts memory. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2457 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/BobbyRShipments.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Laptop/BobbyRShipments.cpp b/Laptop/BobbyRShipments.cpp index ddc51a49..3ba6d75d 100644 --- a/Laptop/BobbyRShipments.cpp +++ b/Laptop/BobbyRShipments.cpp @@ -47,6 +47,7 @@ #define BOBBYR_SHIPMENT_HOME_BUTTON_Y BOBBYR_SHIPMENT_BACK_BUTTON_Y #define BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS 13 +#define MAX_SHIPMENTS_THAT_FIT_ON_SCREEN 13 @@ -155,8 +156,15 @@ BOOLEAN EnterBobbyRShipments() { INT32 iCnt; + // WDS - If there are more than 13 shipments only show 13 because + // that is all that will fit on the screen. If you show more things + // get corrupted. + INT32 max = giNumberOfNewBobbyRShipment; + if (max > MAX_SHIPMENTS_THAT_FIT_ON_SCREEN) + max = MAX_SHIPMENTS_THAT_FIT_ON_SCREEN; + //get the first shipment # - for( iCnt=0; iCnt MAX_SHIPMENTS_THAT_FIT_ON_SCREEN) + max = MAX_SHIPMENTS_THAT_FIT_ON_SCREEN; + + for( uiCnt=0; uiCnt