On Tuesday, 28 June 2016 at 09:31:46 UTC, Sebastiaan Koppe wrote:
If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?"

Since no one is answering:

It depends on the memory right before c. But if there is at least one 0 right before it - which is quite likely - then you get some crazy big number returned.

Yes, the test checked for 0 length but not with a preceding 0. I posted the fix.

  if (c is null || *c==0)



Reply via email to