Fixed refactoring bug in EN_setlinkid

This commit is contained in:
Lew Rossman
2018-11-27 19:25:01 -05:00
parent b7a7cdc5ee
commit d3a50dc490
2 changed files with 18 additions and 6 deletions

View File

@@ -3455,7 +3455,7 @@ int DLLEXPORT EN_setlinkid(EN_Project p, int index, char *newid)
if (index <= 0 || index > net->Nlinks) return 204;
n = strlen(newid);
if (n < 1 || n > MAXID) return 211;
if (strcspn(newid, " ;") < n) 211;
if (strcspn(newid, " ;") < n) return 211;
// Check if another link with same name exists
if (hashtable_find(net->LinkHashTable, newid) > 0) return 215;