From 614a56fe5418cb4700fa616e5c3134fbdb900c4e Mon Sep 17 00:00:00 2001 From: Kriplo Date: Mon, 25 Nov 2013 23:01:48 +0000 Subject: [PATCH] - addon to ch77, fix CTD when swap between random item with less then 12 items and any other item tab. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6653 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Editor/EditorItems.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/EditorItems.cpp b/Editor/EditorItems.cpp index 7e38e3e9..b5c9b6db 100644 --- a/Editor/EditorItems.cpp +++ b/Editor/EditorItems.cpp @@ -332,7 +332,7 @@ void InitEditorItemsInfo(UINT32 uiItemType) //every pair of items (odd rounded up) requires 60 pixels for width. //the minimum buffer size is 420. Height is always 80 pixels. - eInfo.sWidth = (eInfo.sNumItems > 12) ? (((INT32) eInfo.sNumItems+1)/2)*60 : SCREEN_HEIGHT - 120; + eInfo.sWidth = (eInfo.sNumItems > 12) ? (((INT32) eInfo.sNumItems+1)/2)*60 : 360;//dnl ch77 251113 was (SCREEN_HEIGHT - 120) but editor crash if resolution is 1024x768 eInfo.sHeight = 80; // Create item buffer GetCurrentVideoSettings( &usUselessWidth, &usUselessHeight, &ubBitDepth );