mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
Added some more checks and initialization.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4800 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
b936617eb4
commit
3f7fc55c7e
@ -54,7 +54,7 @@
|
||||
|
||||
/* Version numbers of the debug format we understand */
|
||||
#define VER_MAJOR 1U
|
||||
#define VER_MINOR 0U
|
||||
#define VER_MINOR 0U
|
||||
|
||||
/* Dynamic strings */
|
||||
typedef struct StrBuf StrBuf;
|
||||
@ -1663,11 +1663,22 @@ static void ParseSegment (InputData* D)
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
/* Check for required information */
|
||||
/* Check for required and/or matched information */
|
||||
if ((InfoBits & ibRequired) != ibRequired) {
|
||||
ParseError (D, CC65_ERROR, "Required attributes missing");
|
||||
goto ErrorExit;
|
||||
}
|
||||
InfoBits &= (ibOutputName | ibOutputOffs);
|
||||
if (InfoBits != ibNone && InfoBits != (ibOutputName | ibOutputOffs)) {
|
||||
ParseError (D, CC65_ERROR,
|
||||
"Attributes \"outputname\" and \"outputoffs\" must be paired");
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
/* Fix OutputOffs if not given */
|
||||
if (InfoBits == ibNone) {
|
||||
OutputOffs = 0;
|
||||
}
|
||||
|
||||
/* Create the segment info and remember it */
|
||||
S = NewSegInfo (&SegName, Id, Start, Size, &OutputName, OutputOffs);
|
||||
|
Loading…
Reference in New Issue
Block a user