LISTBOX_RemoveItem already does pretty much the same check, you should reuse that instead of duplicating it, you just need to remove the -1 special case in there.
OK - Done, and changed the special case use by setcount appropriately
Changelog
Listbox delete string handling should validate the range of the index + tests
Jason