Added check for missing/empty ProtoField abbrev.

svn path=/trunk/; revision=46078
This commit is contained in:
Stig Bjørlykke 2012-11-18 19:15:34 +00:00
parent 94fb28dfa1
commit a875f6a6e8
1 changed files with 4 additions and 0 deletions

View File

@ -623,6 +623,10 @@ WSLUA_CONSTRUCTOR ProtoField_new(lua_State* L) { /* Creates a new field to be us
WSLUA_ARG_ERROR(ProtoField_new,TYPE,"invalid ftypes");
}
if (!f->abbr || !f->abbr[0]) {
WSLUA_ARG_ERROR(ProtoField_new,ABBR,"Missing abbrev");
}
if (proto_check_field_name(f->abbr)) {
g_free(f->name);
g_free(f->abbr);