as10k1 - increase max number of macros and check the size

- Increase the max number of macros to 30.
- Check the current number of macros to avoid segfault.
This commit is contained in:
Takashi Iwai 2007-01-19 18:30:05 +01:00
parent 4ca5af3d8e
commit 54becc11d0
2 changed files with 5 additions and 1 deletions

View file

@ -46,6 +46,10 @@ void new_macro(char *symbol, char *line, char *operand)
{
extern int source_line_num;
struct sym *sym;
if (macro_ctn >= MAX_DEF_MACRO)
as_exit("Parse Error: Too many macros");
if(isalpha(*symbol)==0)
as_exit("Parse Error: Symbol must start with an alpha character");

View file

@ -108,7 +108,7 @@ struct macrdef{
#define NO_SYM "__NO_NAME"
#define MAX_DEF_MACRO 25
#define MAX_DEF_MACRO 30
#define MAX_MAC_DEPTH 5