Hi,
I think I found a bug with the old KVS. I know, I must be one of the only sticking with the first version of KVS1, but I can't upgrade it at the moment!
The bug is that if I putSimple this:
The data stored in KVS is actually this:
I tried to figure out what's happening, and it could be because any string starting with "0e" is treated as float : https://www.whitehatsec.com/blog/magic-hashes/
I guess the problem with KVS1 was that the type of the column wasn't specified:
so that allows the string to be treated as float.
I know it's a random case, but I figured I should post it, for learning purposes, and it took me quite a while to figure out the problem
I think I found a bug with the old KVS. I know, I must be one of the only sticking with the first version of KVS1, but I can't upgrade it at the moment!
The bug is that if I putSimple this:
B4X:
KVS.PutSimple("ColorAccent", "0e9395")
"ColorAccent": 0
I tried to figure out what's happening, and it could be because any string starting with "0e" is treated as float : https://www.whitehatsec.com/blog/magic-hashes/
I guess the problem with KVS1 was that the type of the column wasn't specified:
B4X:
sql1.ExecNonQuery("CREATE TABLE IF NOT EXISTS main(key TEXT PRIMARY KEY, value NONE)")
I know it's a random case, but I figured I should post it, for learning purposes, and it took me quite a while to figure out the problem