Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 19, 2015, 22:44   #11
chris
PosChengband Maintainer
 
Join Date: Jan 2008
Posts: 702
chris is on a distinguished road
Code:
#include <stdlib.h>

struct foo_s
{
    int foo[5];
    int bar;
};
typedef struct foo_s foo_t;

int main() 
{
    foo_t foo;
    foo.foo[5] = 1;
    return 0;
}
This code gives a warning during compilation, but the access is not reported at runtime. Oddly,
Code:
p_ptr->innate_attacks[MAX_INNATE_ATTACKS].blows = 1;
neither warns nor reports, even though it seems to be the same thing:
Code:
struct player_type
{
    ...
    innate_attack_t innate_attacks[MAX_INNATE_ATTACKS];
    ....
};
chris is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[3.4-RC] Macro problem PowerWyrm Vanilla 3 August 1, 2012 23:47
Tunneling macro help... Skitzman69 Vanilla 3 April 30, 2012 06:39
Macro help Raggy Vanilla 11 June 19, 2011 08:05
can't use @a1 inscription/macro fbas Vanilla 4 November 18, 2010 20:05
Macro difficulty stabbo Vanilla 16 November 18, 2010 08:16


All times are GMT +1. The time now is 01:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.