Mail Archives: djgpp/1999/02/16/22:17:01

From: "Paradox" <ennui AT nettaxi DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Problem with Stack Overflow
Date: 16 Feb 1999 18:46:31 PST
Organization: Concentric Internet Services
Lines: 21
Message-ID: <7adai7$>
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm having a problem with a Stack Overflow ( General Protection Error) . I
Symifyed my program and was told that my errors were }s. I checked over my
code and found out that all my problems were related to one function.

void unequip_other_weapons(void) {
  int x;
  for(x=0;x<sizeof(PS.weapons_array); x++) {
    if(PS.weapons_array[x] == 2) { PS.weapons_array[x] = 1; }

weapons_array is declared as int weapons_array[10];

Can someone tell me what the problem is, and how I can fix it?

ennui AT nettaxi DOT com

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019