hedgewars/PascalExports.pas
changeset 3973 0d1a420531ef
parent 3952 d6412423da45
child 3981 928e2040d34f
--- a/hedgewars/PascalExports.pas	Wed Oct 13 00:01:37 2010 +0200
+++ b/hedgewars/PascalExports.pas	Wed Oct 13 00:57:20 2010 +0200
@@ -1,13 +1,21 @@
 (*
- *  PascalExports.pas
- *  hwengine
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
  *
- *  Created by Vittorio on 09/01/10.
- *  Copyright 2009 __MyCompanyName__. All rights reserved.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-
 {$INCLUDE "options.inc"}
 
 unit PascalExports;
@@ -284,7 +292,8 @@
     a:= CurrentHedgehog^.Ammo;
     for slot:= 0 to cMaxSlotIndex do
         for index:= 0 to cMaxSlotAmmoIndex do
-            counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
+            if a^[slot,index].Count <> 0 then // yes, ammomenu is hell
+                counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count;
     exit(0);
 end;