Hello just me
I think this check was added after the issue was detected.
Probably, and it answers the question, why is
NumPut(65535<<16, a, "int")
The remaining valid questions questions are,
- Why is
varsetcapacity(a) = 0 ? You answered.
- How to get
Varsetcapacity(a) >= 4? I answered.
- Why is
NumPut(65535<<16, &a, "int") ok? I answered.
I don't think that the address is invalid.
It sure is, we can see in script
varsetcapacity(a) = 0
, surely AHK can detect this internally. I don't know why numget doesn't detect the same issue though, it should I guess.
Also, I wonder why the first byte (ANSI) / two bytes (Unicode) is / are not set to zero to mark the string buffer as empty.
My guess is, there is no allocated string buffer to write
This is a case of invalid usage, not a bug, we shouldn't try to either read from, or write to, something which isn't sized properly.
is better, since it is more likely to crash than continue running with invalid results.
Something strange is happening:
I get the same results as you just me
Towards me it just seems that 0 is not cached as a number