--- a/hedgewars/uVisualGearsHandlers.pas Fri Dec 06 23:53:35 2013 +0100
+++ b/hedgewars/uVisualGearsHandlers.pas Sun Dec 08 02:36:14 2013 +0100
@@ -614,10 +614,11 @@
Gear^.Tex:= RenderSpeechBubbleTex(Gear^.Text, Gear^.FrameTicks, fnt16);
+// FrameTicks cannot hold negative values
case Gear^.FrameTicks of
- 1: Gear^.FrameTicks:= SpritesData[sprSpeechTail].Width-28;
- 2: Gear^.FrameTicks:= SpritesData[sprThoughtTail].Width-20;
- 3: Gear^.FrameTicks:= SpritesData[sprShoutTail].Width-10;
+ 1: Gear^.FrameTicks:= max(0,SpritesData[sprSpeechTail].Width-28);
+ 2: Gear^.FrameTicks:= max(0,SpritesData[sprThoughtTail].Width-20);
+ 3: Gear^.FrameTicks:= max(0,SpritesData[sprShoutTail].Width-10);
end;
Gear^.doStep:= @doStepSpeechBubbleWork;