diff --git a/Front.dfm b/Front.dfm index 3f7d863..ac832a7 100644 --- a/Front.dfm +++ b/Front.dfm @@ -105,7 +105,7 @@ object FrontForm: TFrontForm Height = 13 Align = alBottom Alignment = taCenter - Caption = #169' 2002-2022 Eric Fredricksen - v6.4.2' + Caption = #169' 2002-2022 Eric Fredricksen - v6.4.3' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = 11382189 diff --git a/Main.pas b/Main.pas index 1766d3b..bc99663 100644 --- a/Main.pas +++ b/Main.pas @@ -3,7 +3,7 @@ unit Main; {$UNDEF CHEATS} {$UNDEF LOGGING} -{$UNDEF TURBO} +{$DEFINE TURBO} interface @@ -841,11 +841,17 @@ begin t := 0; for i := 0 to 5 do Inc(t,Square(GetI(Stats,i))); t := Random(t); + // High stats cause int overflow if t < 0 then i := Random(Stats.Items.Count) else begin i := -1; while t >= 0 do begin Inc(i); + if i >= Stats.Items.Count then begin + // This happens with high stats due to integer overflow + i := Random(Stats.Items.Count); + break; + end; Dec(t,Square(GetI(Stats,i))); end; end; diff --git a/dist/pq6-4-2.zip b/dist/pq6-4-2.zip new file mode 100644 index 0000000..398383a Binary files /dev/null and b/dist/pq6-4-2.zip differ