mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 23:05:37 +03:00
Merge pull request #275 from xPaw/patch-2
Return an error on Err_OldFile instead of falling through to default case
This commit is contained in:
commit
5c17b1c767
@ -173,6 +173,7 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64
|
|||||||
return (amx->error = AMX_ERR_NOTFOUND);
|
return (amx->error = AMX_ERR_NOTFOUND);
|
||||||
case CAmxxReader::Err_OldFile:
|
case CAmxxReader::Err_OldFile:
|
||||||
strcpy(error, "Plugin uses deprecated format. Update compiler");
|
strcpy(error, "Plugin uses deprecated format. Update compiler");
|
||||||
|
return (amx->error = AMX_ERR_FORMAT);
|
||||||
default:
|
default:
|
||||||
strcpy(error, "Unknown error");
|
strcpy(error, "Unknown error");
|
||||||
return (amx->error = AMX_ERR_NOTFOUND);
|
return (amx->error = AMX_ERR_NOTFOUND);
|
||||||
|
Loading…
Reference in New Issue
Block a user