ref: 7993d3455d9eef8173fe9d9fb24513989d72ce20
parent: 1ab93a194e7242912929b08798447f91e831a090
author: Ben10do <[email protected]>
date: Thu Mar 2 03:02:05 EST 2017
Update alignment error handling Ensure (in rgbasm) that the alignment value is between 1-16. Replaces the previous “alignment must not be negative” check.
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -631,8 +631,8 @@
void
out_NewAlignedSection(char *pzName, ULONG secttype, SLONG alignment, SLONG bank)
{
- if (alignment < 0) {
- yyerror("Alignment must not be negative.");
+ if (alignment < 1 || alignment > 16) {
+ yyerror("Alignment must be between 1-16 bits.");
}
out_SetCurrentSection(out_FindSection(pzName, secttype, -1, bank, 1 << alignment));
}