Index: class.c ================================================================== --- class.c +++ class.c @@ -365,10 +365,16 @@ } h=(h+1)%HASH_SIZE; if(h==m) ParseError("Hash table full\n"); } } + +static int check_improper_name(void) { + unsigned char*p=tokenstr; + while(*p) if(*p++<=32) return 1; + return 0; +} #define ReturnToken(x,y) do{ tokent=x; tokenv=y; return; }while(0) static void nxttok1(void) { int c,i,fl,n,pr; @@ -935,14 +941,16 @@ case 0x0010: // % ReturnToken(TF_NAME|TF_ABNORMAL,OP_LOCAL); case 0x0011: // =% ReturnToken(TF_NAME|TF_ABNORMAL|TF_EQUAL,OP_LOCAL); case 0x0020: // # + if(check_improper_name()) ParseError("Improper message name in {make}\n"); tokent=TF_NAME; tokenv=look_message_name()+0xC000; return; case 0x0040: // $ + if(!*tokenstr || *tokenstr=='(' || check_improper_name()) ParseError("Improper class name in {make}\n"); tokent=TF_NAME; tokenv=look_class_name()+0x4000; return; case 0x0080: // & tokent=TF_FUNCTION|TF_ABNORMAL;