mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Close loophole that allowed methodmaps for enums.
This commit is contained in:
parent
5bb4aeba89
commit
09161bf269
@ -3251,6 +3251,7 @@ static void domethodmap()
|
|||||||
char mapname[sNAMEMAX + 1];
|
char mapname[sNAMEMAX + 1];
|
||||||
methodmap_t *map;
|
methodmap_t *map;
|
||||||
methodmap_t *parent = NULL;
|
methodmap_t *parent = NULL;
|
||||||
|
const char *decltype = "methodmap";
|
||||||
|
|
||||||
// Get the tag.
|
// Get the tag.
|
||||||
if (lex(&val, &str) != tSYMBOL)
|
if (lex(&val, &str) != tSYMBOL)
|
||||||
@ -3258,11 +3259,11 @@ static void domethodmap()
|
|||||||
strcpy(mapname, str);
|
strcpy(mapname, str);
|
||||||
|
|
||||||
if (!isupper(*mapname))
|
if (!isupper(*mapname))
|
||||||
error(109);
|
error(109, decltype);
|
||||||
|
|
||||||
int maptag = pc_addtag(mapname);
|
int maptag = pc_addtag(mapname);
|
||||||
if (methodmap_find_by_tag(maptag))
|
if (methodmap_find_by_tag(maptag))
|
||||||
error(103, mapname);
|
error(103, decltype, mapname);
|
||||||
|
|
||||||
int extends = matchtoken('<');
|
int extends = matchtoken('<');
|
||||||
if (extends) {
|
if (extends) {
|
||||||
@ -3332,7 +3333,7 @@ static void domethodmap()
|
|||||||
first_arg->numtags != 1 ||
|
first_arg->numtags != 1 ||
|
||||||
first_arg->tags[0] != map->tag)
|
first_arg->tags[0] != map->tag)
|
||||||
{
|
{
|
||||||
error(108, mapname);
|
error(108, decltype, mapname);
|
||||||
}
|
}
|
||||||
|
|
||||||
methods = (methodmap_method_t **)realloc(map->methods, sizeof(methodmap_method_t *) * map->nummethods);
|
methods = (methodmap_method_t **)realloc(map->methods, sizeof(methodmap_method_t *) * map->nummethods);
|
||||||
@ -3603,6 +3604,8 @@ static void decl_enum(int vclass)
|
|||||||
*/
|
*/
|
||||||
if (lex(&val,&str)==tLABEL) {
|
if (lex(&val,&str)==tLABEL) {
|
||||||
tag=pc_addtag(str);
|
tag=pc_addtag(str);
|
||||||
|
if (methodmap_find_by_tag(tag))
|
||||||
|
error(110, str, "methodmap");
|
||||||
explicittag=TRUE;
|
explicittag=TRUE;
|
||||||
} else {
|
} else {
|
||||||
lexpush();
|
lexpush();
|
||||||
@ -3613,8 +3616,14 @@ static void decl_enum(int vclass)
|
|||||||
/* get optional enum name (also serves as a tag if no explicit tag was set) */
|
/* get optional enum name (also serves as a tag if no explicit tag was set) */
|
||||||
if (lex(&val,&str)==tSYMBOL) { /* read in (new) token */
|
if (lex(&val,&str)==tSYMBOL) { /* read in (new) token */
|
||||||
strcpy(enumname,str); /* save enum name (last constant) */
|
strcpy(enumname,str); /* save enum name (last constant) */
|
||||||
if (!explicittag)
|
if (!explicittag) {
|
||||||
tag=pc_addtag(enumname);
|
tag=pc_addtag(enumname);
|
||||||
|
if (methodmap_find_by_tag(tag))
|
||||||
|
error(110, str, "methodmap");
|
||||||
|
} else {
|
||||||
|
if (methodmap_find_by_name(enumname))
|
||||||
|
error(110, str, "methodmap");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
lexpush(); /* analyze again */
|
lexpush(); /* analyze again */
|
||||||
enumname[0]='\0';
|
enumname[0]='\0';
|
||||||
|
|||||||
@ -31,14 +31,14 @@ SC_FUNC int strexpand(char *dest, unsigned char *source, int maxlen, unsigned ch
|
|||||||
#define SCPACK_TABLE errstr_table
|
#define SCPACK_TABLE errstr_table
|
||||||
/*-*SCPACK start of pair table, do not change or remove this line */
|
/*-*SCPACK start of pair table, do not change or remove this line */
|
||||||
unsigned char errstr_table[][2] = {
|
unsigned char errstr_table[][2] = {
|
||||||
{101,32}, {116,32}, {111,110}, {105,110}, {97,114}, {115,32}, {100,32}, {116,105}, {101,114}, {37,115}, {109,101}, {97,108}, {135,130}, {34,137}, {141,34}, {110,111},
|
{101,32}, {116,32}, {111,110}, {105,110}, {97,114}, {115,32}, {100,32}, {116,105}, {101,114}, {37,115}, {97,108}, {101,110}, {135,130}, {34,137}, {141,34}, {110,111},
|
||||||
{117,110}, {114,101}, {97,110}, {121,32}, {97,116}, {115,105}, {111,114}, {109,98}, {115,116}, {32,142}, {100,101}, {143,129}, {138,110}, {41,10}, {140,32}, {116,104},
|
{114,101}, {117,110}, {97,110}, {121,32}, {97,116}, {115,105}, {111,114}, {115,116}, {109,98}, {32,142}, {100,101}, {143,129}, {109,139}, {41,10}, {101,134}, {140,32},
|
||||||
{98,108}, {111,108}, {114,97}, {144,99}, {101,134}, {102,163}, {118,139}, {115,121}, {167,151}, {168,161}, {97,32}, {117,115}, {103,32}, {150,32}, {132,162}, {136,32},
|
{98,108}, {111,108}, {114,97}, {145,99}, {102,163}, {116,104}, {118,138}, {115,121}, {167,152}, {97,32}, {168,161}, {117,115}, {103,32}, {150,32}, {132,162}, {136,32},
|
||||||
{99,104}, {103,117}, {115,149}, {177,156}, {97,160}, {132,179}, {101,110}, {101,120}, {105,134}, {166,184}, {109,97}, {101,100}, {111,102}, {102,131}, {165,158}, {131,185},
|
{99,104}, {103,117}, {115,149}, {177,156}, {97,160}, {132,179}, {101,120}, {102,131}, {105,134}, {166,184}, {101,100}, {111,102}, {164,159}, {131,185}, {101,133}, {105,133},
|
||||||
{101,133}, {105,133}, {169,153}, {118,132}, {188,32}, {105,180}, {195,197}, {116,111}, {174,147}, {99,130}, {171,129}, {181,129}, {115,10}, {112,145}, {109,202}, {104,97},
|
{170,153}, {118,132}, {187,32}, {105,180}, {193,195}, {109,101}, {116,111}, {174,147}, {109,97}, {99,130}, {171,129}, {181,129}, {115,10}, {112,144}, {154,183}, {109,202},
|
||||||
{116,97}, {98,128}, {109,148}, {152,148}, {44,32}, {130,32}, {154,189}, {132,97}, {153,10}, {101,10}, {99,146}, {194,157}, {40,219}, {100,105}, {102,105}, {198,128},
|
{104,97}, {116,97}, {98,128}, {109,148}, {151,148}, {44,32}, {130,32}, {132,97}, {153,10}, {101,10}, {99,146}, {192,157}, {40,219}, {100,105}, {102,105}, {196,128},
|
||||||
{218,155}, {34,32}, {139,32}, {117,108}, {99,111}, {97,115}, {149,122}, {118,128}, {110,32}, {146,32}, {131,172}, {210,176}, {101,108}, {108,111}, {111,112}, {116,136},
|
{218,155}, {34,32}, {138,32}, {117,108}, {99,111}, {97,115}, {149,122}, {116,136}, {110,32}, {146,32}, {131,172}, {211,176}, {98,101}, {119,105}, {108,111}, {111,112},
|
||||||
{201,152}, {131,32}, {58,216}, {105,99}, {100,111}, {108,128}, {238,136}, {165,140}, {240,146}, {208,172}, {205,178}, {206,209}, {207,231}, {119,105}, {159,111}
|
{118,128}, {201,151}, {131,32}, {58,216}, {100,111}, {108,128}, {239,136}, {164,140}, {241,146}, {209,172}, {205,178}, {207,210}, {105,99}, {109,112}, {110,117}
|
||||||
};
|
};
|
||||||
/*-*SCPACK end of pair table, do not change or remove this line */
|
/*-*SCPACK end of pair table, do not change or remove this line */
|
||||||
|
|
||||||
@ -145,124 +145,126 @@ static char *errmsg[] = {
|
|||||||
/*099*/ "member \"%s\" appears more than once in struct \"%s\"\n",
|
/*099*/ "member \"%s\" appears more than once in struct \"%s\"\n",
|
||||||
/*100*/ "function prototypes do not match\n",
|
/*100*/ "function prototypes do not match\n",
|
||||||
/*101*/ "specify either all dimensions or only the last dimension\n",
|
/*101*/ "specify either all dimensions or only the last dimension\n",
|
||||||
/*102*/ "cannot find methodmap %s\n",
|
/*102*/ "cannot find %s %s\n",
|
||||||
/*103*/ "methodmap %s was already defined\n",
|
/*103*/ "%s %s was already defined\n",
|
||||||
/*104*/ "cannot find any methods for %s\n",
|
/*104*/ "cannot find any methods for %s\n",
|
||||||
/*105*/ "cannot find method %s.%s\n",
|
/*105*/ "cannot find method %s.%s\n",
|
||||||
/*106*/ "cannot call methods on an array\n",
|
/*106*/ "cannot call methods on an array\n",
|
||||||
/*107*/ "cannot call methods on a function\n",
|
/*107*/ "cannot call methods on a function\n",
|
||||||
/*108*/ "method must have a first argument exactly matching the methodmap type (%s)\n",
|
/*108*/ "method must have a first argument exactly matching the %s type (%s)\n",
|
||||||
/*109*/ "methodmap name must start with an uppercase letter\n",
|
/*109*/ "%s name must start with an uppercase letter\n",
|
||||||
|
/*110*/ "%s has already been defined as a %s\n",
|
||||||
#else
|
#else
|
||||||
"\267pect\244\307k\266:\231\324bu\201fo\220\206\216\012",
|
"\266pect\236\306k\213:\231\325bu\201fo\221\206\216\012",
|
||||||
"\202l\223\252s\203g\365\323e\234\201(\255\267\372\202) \332 f\241\355w ea\260 \042c\345e\042\012",
|
"\202l\223\251s\203g\365\324e\234\201(\255\266\372\202) \332 f\241\356w ea\260 \042c\345e\042\012",
|
||||||
"\232cl\327\236\304\252\355c\342\337\316appe\204 \361\252\344mpo\220\206\240ock\012",
|
"\232cl\327\237\302\251\356c\342\337\317appe\204 \362\251\344\375o\221\206\240ock\012",
|
||||||
"\367\231 \301\233imple\234t\273\012",
|
"\367\231 \277\233i\375le\234t\272\012",
|
||||||
"\276\272\223\233\374\265t\314",
|
"\274\310\223\233\320\360\265t\314",
|
||||||
"\373a\262gn\244\307 \351\256y\012",
|
"\373a\262gn\236\306 \351\256y\012",
|
||||||
"\366\224\255\340\321\221\326\273\012",
|
"\366\224\255\340\322\220\316\272\012",
|
||||||
"\373\252\370\201\267\372\202; \345su\212\206z\210o\012",
|
"\373\251\370\201\266\372\202; \345sum\236z\210o\012",
|
||||||
"\277\310\346\200(nega\207ve\324z\210o \255ou\201\304bo\220ds\235",
|
"\275\307\346\200(nega\207ve\325z\210o \255ou\201\302bo\221ds\235",
|
||||||
"\277\276\255\232cl\327\214\012",
|
"\275\274\255\232cl\327\214\012",
|
||||||
"\277out\225d\200\367\314",
|
"\275out\225d\200\367\314",
|
||||||
"\277\276c\213l\324\233\252\271add\221s\314",
|
"\275\274c\212l\325\233\251\271add\220s\314",
|
||||||
"\217 \266tr\223po\203\201(\217 pu\240\363 \367s\235",
|
"\217 \213tr\223po\203\201(\217 pu\240\374 \367s\235",
|
||||||
"\277\323e\234t; \233\361s\375t\260\012",
|
"\275\324e\234t; \233\362s\355t\260\012",
|
||||||
"\042\232fa\343t\341c\345\200\373\237\200l\345\201c\345\200\361s\375t\260 \323e\234t\012",
|
"\042\232fa\343t\341c\345\200\373\245\200l\345\201c\345\200\362s\355t\260 \324e\234t\012",
|
||||||
"m\343\207p\365\232fa\343t\205\361\042s\375t\260\042\012",
|
"m\343\207p\365\232fa\343t\205\362\042s\355t\260\042\012",
|
||||||
"\220\326\244\302\012",
|
"\221\316\236\300\012",
|
||||||
"\203i\207\213iza\236d\224\252\267ce\273\205\232cl\204\244\346\331",
|
"\203i\207\212iza\237d\224\251\266ce\272\205\232cl\204\236\346\331",
|
||||||
"\233\252lab\354\362",
|
"\233\251la\354l\363",
|
||||||
"\277\251 nam\200\216\012",
|
"\275\252 nam\200\216\012",
|
||||||
"\251 \213\221ad\223\326\273\362",
|
"\252 \212\220ad\223\316\272\363",
|
||||||
"\373l\246u\200(n\202-\370t\235",
|
"\373l\246u\200(n\202-\370t\235",
|
||||||
"\310a\262gn\234\201\373\225mp\365a\262gn\234t\012",
|
"\307a\262gn\234\201\373\225\375\365a\262gn\234t\012",
|
||||||
"\042b\221ak\341\255\042\311t\203ue\341\301ou\201\304\311t\267t\012",
|
"\042b\220ak\341\255\042\311t\203ue\341\277ou\201\302\311t\266t\012",
|
||||||
"\276head\352\335ff\210\205from pro\307typ\331",
|
"\274head\352\335ff\210\205from pro\306typ\331",
|
||||||
"\217 \353\352\042#if...\042\012",
|
"\217 \353\352\042#if...\042\012",
|
||||||
"\277\260\327ct\257\370t\012",
|
"\275\260\327ct\257\370t\012",
|
||||||
"\277subscrip\201(\233\351\310\255\307o m\222\223subscripts)\362",
|
"\275subscrip\201(\233\351\307\255\306o m\222\223subscripts)\363",
|
||||||
"\277\267\372\202\324\345su\212\206z\210o\012",
|
"\275\266\372\202\325\345sum\236z\210o\012",
|
||||||
"\344mpo\220\206\323e\234\201\233c\355s\244a\201\237\200\266\206\304\336\365(\230\204t\244a\201l\203\200%d\235",
|
"\344\375o\221\206\324e\234\201\233c\356s\236a\201\245\200\213\206\302\336\365(\227\204t\236a\201l\203\200%d\235",
|
||||||
"\220k\217w\350\335\221c\207v\331",
|
"\221k\217w\350\335\220c\207v\331",
|
||||||
"\310\203\232x ou\201\304bo\220d\205(\337\216\235",
|
"\307\203\232x ou\201\302bo\221d\205(\337\216\235",
|
||||||
"\310\373\203\232x\244(\337\216\235",
|
"\307\373\203\232x\236(\337\216\235",
|
||||||
"\313\364\300\233\374\252\232fa\343\201\246u\200(\313%d\235",
|
"\313\364\276\233\320\360\251\232fa\343\201\246u\200(\313%d\235",
|
||||||
"\313typ\200mis\353 (\313%d\235",
|
"\313typ\200mis\353 (\313%d\235",
|
||||||
"empt\223\323e\234t\012",
|
"e\375t\223\324e\234t\012",
|
||||||
"\277\230r\352(po\262\240\223n\202-\357m\203\224\244\230r\203g\235",
|
"\275\227r\352(po\262\240\223n\202-\347m\203\224\236\227r\203g\235",
|
||||||
"\267t\242 \260\327c\357\205\325l\203\331",
|
"\266t\242 \260\327c\347\205\326l\203\331",
|
||||||
"\370\201\251 \317\205\217 \346\331",
|
"\370\201\252 \320\205\217 \346\331",
|
||||||
"dupl\363\224\200\042c\345e\341lab\354 (\246u\200%d\235",
|
"dupl\374\224\200\042c\345e\341la\354l (\246u\200%d\235",
|
||||||
"\277\354lip\225s\324\310\346\200\301\233k\217wn\012",
|
"\275ellip\225s\325\307\346\200\277\233k\217wn\012",
|
||||||
"\277\344\227\203a\236\304cl\345\205speci\336\210\314",
|
"\275\344\230\203a\237\302cl\345\205speci\336\210\314",
|
||||||
"\260\327ct\257\370\201\267ce\273\205r\222g\200f\255pack\244\230r\203g\012",
|
"\260\327ct\257\370\201\266ce\272\205r\222g\200f\255pack\236\227r\203g\012",
|
||||||
"po\225\214\342p\327\212\357\205\316\315c\273\200\213l na\212\206p\327\212\357\314",
|
"po\225\214\342p\327\305\347\205\317\315c\272\200\212l nam\236p\327\305\347\314",
|
||||||
"\307o m\222\223\276\265t\314",
|
"\306o m\222\223\274\265t\314",
|
||||||
"\220k\217w\350\310\346\200(\337\216\235",
|
"\221k\217w\350\307\346\200(\337\216\235",
|
||||||
"\310\346\300\364 \233\353\324\255\232\230\203a\236\310\301\307o sm\213l\012",
|
"\307\346\276\364 \233\353\325\255\232\227\203a\237\307\277\306o sm\212l\012",
|
||||||
"\310(\205\364 \233\353\012",
|
"\307(\205\364 \233\353\012",
|
||||||
"\277l\203\200\311t\203ua\214\012",
|
"\275l\203\200\311t\203ua\214\012",
|
||||||
"\277r\222g\331",
|
"\275r\222g\331",
|
||||||
"\277subscript\324\253\200\042[ ]\341\366\224\226\205\325\272j\255\335\234\225\202\314",
|
"\275subscript\325\253\200\042[ ]\341\366\224\226\205\326\310j\255\335\234\225\202\314",
|
||||||
"m\343\207-\335\234\225\202\342\256y\205\373f\343l\223\203i\207\213iz\273\012",
|
"m\343\207-\335\234\225\202\342\256y\205\373f\343l\223\203i\207\212iz\272\012",
|
||||||
"\267ce\273\352\272ximum nu\227\257\304\335\234\225\202\314",
|
"\266ce\272\352\310ximum \376\230\257\302\335\234\225\202\314",
|
||||||
"\220\353\244c\355s\352b\242c\200(\042}\042\235",
|
"\221\353\236c\356s\352b\242c\200(\042}\042\235",
|
||||||
"\230\204\201\304\276bod\223\375\376u\201\276head\210\012",
|
"\227\204\201\302\274bod\223\355\245ou\201\274head\210\012",
|
||||||
"\256ys\324\355c\342\306\300\222\206\276\265t\205\340\321pu\240\363 (\337\216\235",
|
"\256ys\325\356c\342\304\276\222\206\274\265t\205\340\322pu\240\374 (\337\216\235",
|
||||||
"\220\275ish\244\267\372\325bef\226\200\344mpil\257\335\221c\207v\331",
|
"\221\267ish\236\266\372\326\354f\226\200\344\375il\257\335\220c\207v\331",
|
||||||
"dupl\363\224\200\265t; sam\200\313\301p\345s\244tw\363\331",
|
"dupl\374\224\200\265t; sam\200\313\277p\345s\236t\355c\331",
|
||||||
"\276\313\272\223\233\374\252\232fa\343\201\246u\200(\337\216\235",
|
"\274\313\310\223\233\320\360\251\232fa\343\201\246u\200(\337\216\235",
|
||||||
"m\343\207p\365\042#\354se\341\335\221c\207v\300betwe\266 \042#if ... #\266\335f\042\012",
|
"m\343\207p\365\042#else\341\335\220c\207v\276\354twe\213 \042#if ... #\213\335f\042\012",
|
||||||
"\042#\354seif\341\335\221c\207\347f\241\355w\205\351\042#\354se\341\335\221c\207v\331",
|
"\042#elseif\341\335\220c\207\360f\241\356w\205\351\042#else\341\335\220c\207v\331",
|
||||||
"nu\227\257\304\366\222d\205\364\300\233\336\201\237\200\366\224\226\012",
|
"\376\230\257\302\366\222d\205\364\276\233\336\201\245\200\366\224\226\012",
|
||||||
"\276\221s\343\201\371\304\366\224\226\231 \373\216\012",
|
"\274\220s\343\201\371\302\366\224\226\231 \373\216\012",
|
||||||
"\340\260\222g\200\315\326\244\366\224\226\314",
|
"\340\260\222g\200\315\316\236\366\224\226\314",
|
||||||
"\276\313\272\223\202l\223\374\252s\203g\365\371(\313%d\235",
|
"\274\313\310\223\202l\223\320\360\251s\203g\365\371(\313%d\235",
|
||||||
"\276\313\272\223\233\321\252\221f\210\266c\200\313\255\351\310(\313\216\235",
|
"\274\313\310\223\233\322\251\220f\210\213c\200\313\255\351\307(\313\216\235",
|
||||||
"\337\340\321bo\237 \252\221f\210\266c\200\222\206\351\310(\337\216\235",
|
"\337\340\322bo\245 \251\220f\210\213c\200\222\206\351\307(\337\216\235",
|
||||||
"\277\242\214\342nu\227\257\315ci\225\325\361#p\242g\272\012",
|
"\275\242\214\342\376\230\257\315ci\225\326\362#p\242g\310\012",
|
||||||
"\242\214\342nu\227\257f\226\272\201\213\221ad\223\326\273\012",
|
"\242\214\342\376\230\257f\226\310\201\212\220ad\223\316\272\012",
|
||||||
"\242\214\342nu\227\257supp\226\201wa\205\233\266\264\273\012",
|
"\242\214\342\376\230\257supp\226\201wa\205\233\213\264\272\012",
|
||||||
"\253\210-\326\244\366\224\255\373\232cl\204\244bef\226\200\253\200(\367\231\235",
|
"\253\210-\316\236\366\224\255\373\232cl\204\236\354f\226\200\253\200(\367\231\235",
|
||||||
"\042\346e\274\341\366\224\255\301\277\325\042\367\341\251\314",
|
"\042\346e\273\341\366\224\255\277\275\326\042\367\341\252\314",
|
||||||
"\276\313\373\351\310(\313\216\235",
|
"\274\313\373\351\307(\313\216\235",
|
||||||
"#\326\200p\224\357\350\316\230\204\201\375\237 \351\213p\317be\207c \260\327c\357\012",
|
"#\316\200p\224\347\350\317\227\204\201\355\245 \351\212p\320\354\207c \260\327c\347\012",
|
||||||
"\203pu\201l\203\200\307o l\202\254(aft\257subs\207tu\214s\235",
|
"\203pu\201l\203\200\306o l\202\254(aft\257subs\207tu\214s\235",
|
||||||
"\247n\320x \210r\255\361\237\200\267\372\202\324\255\277\276c\213l\012",
|
"\247n\321x \210r\255\362\245\200\266\372\202\325\255\275\274c\212l\012",
|
||||||
"m\213f\226\212\206UTF-8 \266\344d\203g\324\255c\226rupt\244\336le: \211\012",
|
"m\212f\226m\236UTF-8 \213\344d\203g\325\255c\226rupt\236\336le: \211\012",
|
||||||
"\276\253\300bo\237 \042\221turn\341\222\206\042\221tur\350<\246ue>\042\012",
|
"\274\253\276bo\245 \042\220turn\341\222\206\042\220tur\350<\246ue>\042\012",
|
||||||
"\203\311\225\230\266\201\221tur\350typ\300(\310& n\202-\256y\235",
|
"\203\311\225\227\213\201\220tur\350typ\276(\307& n\202-\256y\235",
|
||||||
"\220k\217w\350\251\324\255\233\252\370\201\251 \334",
|
"\221k\217w\350\252\325\255\233\251\370\201\252 \334",
|
||||||
"\340\320k\200\252\371a\205\252\232fa\343\201\246u\200f\255\351\203\232x\244\310p\327\212t\257\334",
|
"\340\321k\200\251\371a\205\251\232fa\343\201\246u\200f\255\351\203\232x\236\307p\327\305t\257\334",
|
||||||
"\253\210-\326\244\366\224\226\205\222\206na\207\347\367\205\272\223\233\374\323e\314",
|
"\253\210-\316\236\366\224\226\205\222\206na\207\360\367\205\310\223\233\320\360\324e\314",
|
||||||
"\252\276\255\337\272\223\202l\223b\354\202\254\307 \252s\203g\365au\307\322\325\334",
|
"\251\274\255\337\310\223\202l\223\354l\202\254\306 \251s\203g\365au\306\323\326\334",
|
||||||
"\323\200\311fl\363t: \202\200\304\237\200\323\300\301\213\221ad\223a\262gn\244\307 a\217\237\257imple\234\320\236\334",
|
"\324\200\311fl\374t: \202\200\302\245\200\324\276\277\212\220ad\223a\262gn\236\306 a\217\245\257i\375le\234\321\237\334",
|
||||||
"\217 \323\300\204\200\326\244f\255\302\012",
|
"\217 \324\276\204\200\316\236f\255\300\012",
|
||||||
"\220k\217w\350au\307\322\202\330",
|
"\221k\217w\350au\306\323\202\330",
|
||||||
"\220k\217w\350\323\200\216 f\255au\307\322\202\330",
|
"\221k\217w\350\324\200\216 f\255au\306\323\202\330",
|
||||||
"pu\240\363 \306\300\222\206\355c\342\306\300\272\223\233\374\323\300\334",
|
"pu\240\374 \304\276\222\206\356c\342\304\276\310\223\233\320\360\324\276\334",
|
||||||
"\323\200\306\300\272\223\233\321\203i\207\213iz\244\334",
|
"\324\200\304\276\310\223\233\322\203i\207\212iz\236\334",
|
||||||
"pu\240\363 \367\205\272\223\233\221tur\350\256y\205\334",
|
"pu\240\374 \367\205\310\223\233\220tur\350\256y\205\334",
|
||||||
"a\227i\261ou\205\370t; \371ov\210rid\200\301\221qui\221\206\334",
|
"a\230i\261ou\205\370t; \371ov\210rid\200\277\220qui\220\206\334",
|
||||||
"nu\227\257\304\265t\205\364\300\233\353 \326i\214\012",
|
"\376\230\257\302\265t\205\364\276\233\353 \316i\214\012",
|
||||||
"\267pect\244\371nam\200i\232n\207\336\210\012",
|
"\266pect\236\371nam\200id\213\207\336\210\012",
|
||||||
"\276\266um\210a\236\221qui\221\205\220iqu\200\320g\012",
|
"\274\213um\210a\237\220qui\220\205\221iqu\200\321g\012",
|
||||||
"\340\374\221qui\221\206p\327\212\357\205aft\257\356\214\342p\327\212\357\314",
|
"\340\320\360\220qui\220\206p\327\305\347\205aft\257\357\214\342p\327\305\347\314",
|
||||||
"\344\343\206\233\275\206\212\227\210\231 \361\230ruc\201\216\012",
|
"\344\343\206\233\267\206\305\230\210\231 \362\227ruc\201\216\012",
|
||||||
"\302 \364\300\233\374\252\353\352typ\331",
|
"\300 \364\276\233\320\360\251\353\352typ\331",
|
||||||
"\230ruc\201\221qui\221\205\220iqu\200\230ruc\201na\212\012",
|
"\227ruc\201\220qui\220\205\221iqu\200\227ruc\201na\305\012",
|
||||||
"\212\227\210\231 appe\204\205m\226\200\237\351\202c\200\361\230ruc\201\216\012",
|
"\305\230\210\231 appe\204\205m\226\200\245\351\202c\200\362\227ruc\201\216\012",
|
||||||
"\276pro\307typ\300\364 \233\353\012",
|
"\274pro\306typ\276\364 \233\353\012",
|
||||||
"specif\223ei\237\257\213l \335\234\225\202\205\255\202l\223\237\200l\345\201\335\234\225\202\012",
|
"specif\223ei\245\257\212l \335\234\225\202\205\255\202l\223\245\200l\345\201\335\234\225\202\012",
|
||||||
"\340\275\206\212\376d\272p \211\012",
|
"\340\267\206%\205\211\012",
|
||||||
"\212\376d\272p %\205wa\205\213\221ad\223\326\273\012",
|
"%\205%\205wa\205\212\220ad\223\316\272\012",
|
||||||
"\340\275\206\222\223\212\376d\205f\255\211\012",
|
"\340\267\206\222\223\305\245od\205f\255\211\012",
|
||||||
"\340\275\206\212\376\206\211.\211\012",
|
"\340\267\206\305\245o\206\211.\211\012",
|
||||||
"\340c\213l \212\376d\205\325\351\256y\012",
|
"\340c\212l \305\245od\205\326\351\256y\012",
|
||||||
"\340c\213l \212\376d\205\325\252\367\012",
|
"\340c\212l \305\245od\205\326\251\367\012",
|
||||||
"\212\376\206\316\374\252\336rs\201\313\267actl\223\353\352\237\200\212\376d\272p typ\200(\211\235",
|
"\305\245o\206\317\320\360\251\336rs\201\313\266actl\223\353\352\245\200%\205typ\200(\211\235",
|
||||||
"\212\376d\272p \316\374\351Upp\210c\345\200na\212\012"
|
"%\205nam\200\317\227\204\201\355\245 \351upp\210c\345\200let\347\012",
|
||||||
|
"%\205\320\205\212\220ad\223\354\213 \316\236a\205\251\211\012"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -287,17 +289,17 @@ static char *fatalmsg[] = {
|
|||||||
/*130*/ "assertion failed: %s\n",
|
/*130*/ "assertion failed: %s\n",
|
||||||
/*131*/ "user error: %s\n",
|
/*131*/ "user error: %s\n",
|
||||||
#else
|
#else
|
||||||
"\340\221a\206from \336le\362",
|
"\340\220a\206from \336le\363",
|
||||||
"\340writ\200\307 \336le\362",
|
"\340writ\200\306 \336le\363",
|
||||||
"t\264\200ov\210f\355w\362",
|
"t\264\200ov\210f\356w\363",
|
||||||
"\203suf\336ci\266\201\212m\226y\012",
|
"\203suf\336ci\213\201\305m\226y\012",
|
||||||
"\277\345se\227l\257\203\230ruc\214\330",
|
"\275\345se\230l\257\203\227ruc\214\330",
|
||||||
"num\210\363 ov\210f\355w\324\267ce\273\352capacity\012",
|
"\376m\210\374 ov\210f\356w\325\266ce\272\352capacity\012",
|
||||||
"\344mpil\244scrip\201\267ce\273\205\237\200\272ximum \212m\226\223\346\200(%l\206bytes\235",
|
"\344\375il\236scrip\201\266ce\272\205\245\200\310ximum \305m\226\223\346\200(%l\206bytes\235",
|
||||||
"\307o m\222\223\210r\255\212ssag\300\325\202\200l\203\331",
|
"\306o m\222\223\210r\255\305ssag\276\326\202\200l\203\331",
|
||||||
"\344\232pag\200\272pp\352\336\365\233fo\220d\012",
|
"\344\232pag\200\310pp\352\336\365\233fo\221d\012",
|
||||||
"\277p\224h\362",
|
"\275p\224h\363",
|
||||||
"\345s\210\236fail\273: \211\012",
|
"\345s\210\237fail\272: \211\012",
|
||||||
"\253\257\210r\226: \211\012"
|
"\253\257\210r\226: \211\012"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -342,43 +344,43 @@ static char *warnmsg[] = {
|
|||||||
/*235*/ "public function lacks forward declaration (symbol \"%s\")\n",
|
/*235*/ "public function lacks forward declaration (symbol \"%s\")\n",
|
||||||
/*236*/ "unknown parameter in substitution (incorrect #define pattern)\n"
|
/*236*/ "unknown parameter in substitution (incorrect #define pattern)\n"
|
||||||
#else
|
#else
|
||||||
"\302 \301tr\243\224\244\307 %\206\260\327c\357\314",
|
"\300 \277tr\243\224\236\306 %\206\260\327c\347\314",
|
||||||
"\221\326i\236\304\370t/\272cro \334",
|
"\220\316i\237\302\370t/\310cro \334",
|
||||||
"nu\227\257\304\265t\205\364\300\233\353 \326i\214\012",
|
"\376\230\257\302\265t\205\364\276\233\353 \316i\214\012",
|
||||||
"\251 \301nev\257\253\273\362",
|
"\252 \277nev\257\253\272\363",
|
||||||
"\251 \301a\262gn\244\252\246u\200\237a\201\301nev\257\253\273\362",
|
"\252 \277a\262gn\236\251\246u\200\245a\201\277nev\257\253\272\363",
|
||||||
"\221d\220d\222\201\344\232: \370\201\267\372\325\301z\210o\012",
|
"\220d\221d\222\201\344\232: \370\201\266\372\326\277z\210o\012",
|
||||||
"\221d\220d\222\201te\230: \370\201\267\372\325\301n\202-z\210o\012",
|
"\220d\221d\222\201te\227: \370\201\266\372\326\277n\202-z\210o\012",
|
||||||
"\220k\217w\350#p\242g\272\012",
|
"\221k\217w\350#p\242g\310\012",
|
||||||
"\276\375\237 \371\221s\343\201\253\244bef\226\200\326i\214\324f\226c\352\221p\204s\331",
|
"\274\355\245 \371\220s\343\201\253\236\354f\226\200\316i\214\325f\226c\352\220p\204s\331",
|
||||||
"\367\231 sho\343\206\221tur\350\252\246u\331",
|
"\367\231 sho\343\206\220tur\350\251\246u\331",
|
||||||
"po\262\240\200\253\200\304\251 bef\226\200\203i\207\213iza\214\362",
|
"po\262\240\200\253\200\302\252 \354f\226\200\203i\207\212iza\214\363",
|
||||||
"po\262\240\223\220\203t\266\232\206a\262gn\234t\012",
|
"po\262\240\223\221\203t\213\232\206a\262gn\234t\012",
|
||||||
"po\262\240\223\220\203t\266\232\206bit\375s\200\366a\214\012",
|
"po\262\240\223\221\203t\213\232\206bit\355s\200\366a\214\012",
|
||||||
"\371mis\353\012",
|
"\371mis\353\012",
|
||||||
"po\262\240\223\252\042\360\341\310\313wa\205\203t\266\232d\362",
|
"po\262\240\223\251\042\361\341\307\313wa\205\203t\213\232d\363",
|
||||||
"\267\372\325\317\205\217 effect\012",
|
"\266\372\326\320\205\217 effect\012",
|
||||||
"ne\230\244\344m\234t\012",
|
"ne\227\236\344m\234t\012",
|
||||||
"\355os\200\203\232n\320\214\012",
|
"\356os\200\203d\213\321\214\012",
|
||||||
"\241\206\230y\365pro\307typ\300\253\244\375\237 \356\214\342sem\363\241umn\314",
|
"\241\206\227y\365pro\306typ\276\253\236\355\245 \357\214\342sem\374\241umn\314",
|
||||||
"\355c\342\337\216 s\317\364w\205\252\337a\201\252\315c\273\352lev\354\012",
|
"\356c\342\337\216 s\320\364w\205\251\337a\201\251\315c\272\352level\012",
|
||||||
"\267\372\325\375\237 \371ov\210rid\200\316appe\204 betwe\266 p\204\266\237ese\314",
|
"\266\372\326\355\245 \371ov\210rid\200\317appe\204 \354twe\213 p\204\213\245ese\314",
|
||||||
"lab\354 nam\200\216 s\317\364w\205\371na\212\012",
|
"la\354l nam\200\216 s\320\364w\205\371na\305\012",
|
||||||
"nu\227\257\304\335git\205\267ce\273\205\242\214\342nu\227\257\315ci\225\202\012",
|
"\376\230\257\302\335git\205\266ce\272\205\242\214\342\376\230\257\315ci\225\202\012",
|
||||||
"\221d\220d\222\201\042\346e\274\042: \313\346\200\301\213way\2051 \334",
|
"\220d\221d\222\201\042\346e\273\042: \313\346\200\277\212way\2051 \334",
|
||||||
"\203\232\357m\203\224\200\310\346\200\361\042\346e\274\341\267\372\325\334",
|
"\203\232\347m\203\224\200\307\346\200\362\042\346e\273\341\266\372\326\334",
|
||||||
"\220\221a\260\264\200\344\232\012",
|
"\221\220a\260\264\200\344\232\012",
|
||||||
"\252\337\301a\262gn\244\307 its\354f \334",
|
"\251\337\277a\262gn\236\306 itself \334",
|
||||||
"m\226\200\203i\207\213iz\210\205\237\351\266um \336\354d\314",
|
"m\226\200\203i\207\212iz\210\205\245\351\213um \336eld\314",
|
||||||
"l\266g\237 \304\203i\207\213iz\257\267ce\273\205\346\200\304\237\200\266um \336\354d\012",
|
"l\213g\245 \302\203i\207\212iz\257\266ce\272\205\346\200\302\245\200\213um \336eld\012",
|
||||||
"\203\232x \371mis\353 \334",
|
"\203\232x \371mis\353 \334",
|
||||||
"\217 imple\234\320\236f\255\323\200\216 \361\367\231\324\217 f\213l-back\012",
|
"\217 i\375le\234\321\237f\255\324\200\216 \362\367\231\325\217 f\212l-back\012",
|
||||||
"\323\200speci\336ca\236\325f\226w\204\206\232cl\327\236\301ig\217\221d\012",
|
"\324\200speci\336ca\237\326f\226w\204\206\232cl\327\237\277ig\217\220d\012",
|
||||||
"outpu\201\336\365\301writt\266\324bu\201\375\237 \344mpac\201\266\344d\352\335s\264\273\012",
|
"outpu\201\336\365\277writt\213\325bu\201\355\245 \344\375ac\201\213\344d\352\335s\264\272\012",
|
||||||
"\323\200\337\216 s\317\364w\205\252g\355b\342\306\331",
|
"\324\200\337\216 s\320\364w\205\251g\356b\342\304\331",
|
||||||
"\302 \301m\204k\244a\205\232\315c\224\273: \211\012",
|
"\300 \277m\204k\236a\205\232\315c\224\272: \211\012",
|
||||||
"pu\240\363 \276lack\205f\226w\204\206\232cl\327\236\334",
|
"pu\240\374 \274lack\205f\226w\204\206\232cl\327\237\334",
|
||||||
"\220k\217w\350p\327\212t\257\361subs\207tu\236(\203c\226\221c\201#\326\200p\224\357n\235"
|
"\221k\217w\350p\327\305t\257\362subs\207tu\237(\203c\226\220c\201#\316\200p\224\347n\235"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
15
sourcepawn/compiler/tests/fail-redef-methodmap-as-enum.sp
Normal file
15
sourcepawn/compiler/tests/fail-redef-methodmap-as-enum.sp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
native CloseHandle(Handle:this);
|
||||||
|
|
||||||
|
methodmap Handle {
|
||||||
|
Close = CloseHandle;
|
||||||
|
};
|
||||||
|
|
||||||
|
methodmap Crab {
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Crab {
|
||||||
|
};
|
||||||
|
|
||||||
|
public main()
|
||||||
|
{
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user