From 1bd953dd4091d6434973efeeeceecb9576ad3a95 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 2 Apr 2017 00:55:27 -0500 Subject: [PATCH] Fix memory trashing bug. This occurred because a global with structure type was declared without the structure definition in scope. ORCA/C allows this, and just treats the struct variable as having size 0. As a result, it effectively shares the storage of whatever comes after it in the OMF file, leading to memory trashing. --- atipmapping.c | 2 ++ atipmapping.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/atipmapping.c b/atipmapping.c index 50beed9..1d6168c 100644 --- a/atipmapping.c +++ b/atipmapping.c @@ -1,3 +1,5 @@ #pragma noroot +#include "atipmapping.h" + struct ATIPMapping atipMapping; diff --git a/atipmapping.h b/atipmapping.h index 024cb3c..1dcac5d 100644 --- a/atipmapping.h +++ b/atipmapping.h @@ -1,6 +1,8 @@ #ifndef ATIPMAPPING_H #define ATIPMAPPING_H +#include + typedef struct ATIPMapping { /* AppleTalk address/socket */ Word networkNumber; /* in network byte order */