libwiretap: fix test for built-in file types.

The file type/subtype for built-in types are <=
wtap_num_builtin_file_types_subtypes - the plugin types are given
type/subtype values after the last built-in type/subtype value.

Fixes #17614.
This commit is contained in:
Guy Harris 2021-09-25 14:09:41 -07:00
parent 047542b587
commit 92d77cef7a
1 changed files with 1 additions and 1 deletions

View File

@ -1396,7 +1396,7 @@ wtap_deregister_file_type_subtype(const int subtype)
ws_error("invalid file type to de-register");
return;
}
if ((guint)subtype >= wtap_num_builtin_file_types_subtypes) {
if ((guint)subtype < wtap_num_builtin_file_types_subtypes) {
ws_error("built-in file types cannot be de-registered");
return;
}