mirror of
https://github.com/cc65/cc65.git
synced 2024-10-03 12:55:56 +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 */
|
/* Version numbers of the debug format we understand */
|
||||||
#define VER_MAJOR 1U
|
#define VER_MAJOR 1U
|
||||||
#define VER_MINOR 0U
|
#define VER_MINOR 0U
|
||||||
|
|
||||||
/* Dynamic strings */
|
/* Dynamic strings */
|
||||||
typedef struct StrBuf StrBuf;
|
typedef struct StrBuf StrBuf;
|
||||||
@ -1663,11 +1663,22 @@ static void ParseSegment (InputData* D)
|
|||||||
goto ErrorExit;
|
goto ErrorExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for required information */
|
/* Check for required and/or matched information */
|
||||||
if ((InfoBits & ibRequired) != ibRequired) {
|
if ((InfoBits & ibRequired) != ibRequired) {
|
||||||
ParseError (D, CC65_ERROR, "Required attributes missing");
|
ParseError (D, CC65_ERROR, "Required attributes missing");
|
||||||
goto ErrorExit;
|
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 */
|
/* Create the segment info and remember it */
|
||||||
S = NewSegInfo (&SegName, Id, Start, Size, &OutputName, OutputOffs);
|
S = NewSegInfo (&SegName, Id, Start, Size, &OutputName, OutputOffs);
|
||||||
|
Loading…
Reference in New Issue
Block a user