HaveItem does not work if uppercase letters are used
Posted: Tue Apr 04, 2023 10:03 pm
If I put a key with uppercase letters into a table, HaveItem does not find it. I found some similar issues in the forum, but these claim that table keys are case sensitive, so I consider this a bug in HaveItem().
I guess there is a LowerStr() in HaveItem, which should not be there.
I guess there is a LowerStr() in HaveItem, which should not be there.
Code: Select all
table = {}
table["Hello AMIGA"] = "AMIGA"
DebugPrint(table["Hello AMIGA"])
DebugPrint(HaveItem(table, "Hello AMIGA")) ; Does not find it -> BUG
DebugPrint(HaveItem(table, "hello amiga")) ; Does not find it -> correct
table = {}
table["HelloAMIGA"] = "AMIGA"
DebugPrint(table["HelloAMIGA"])
DebugPrint(HaveItem(table, "HelloAMIGA")) ; Does not find it -> BUG
DebugPrint(HaveItem(table, "helloamiga")) ; Does not find it -> correct
table = {}
table["hello amiga"] = "AMIGA"
DebugPrint(table["hello amiga"])
DebugPrint(HaveItem(table, "Hello AMIGA")) ; Does find it -> BUG
DebugPrint(HaveItem(table, "hello amiga")) ; Does find it -> correct
table = {}
table["helloamiga"] = "AMIGA"
DebugPrint(table["helloamiga"])
DebugPrint(HaveItem(table, "HelloAMIGA")) ; Does find it -> BUG
DebugPrint(HaveItem(table, "helloamiga")) ; Does find it -> correct