4 ms·
> we'd inexplicably get a crash in printf [..] The client in debug would print out the hashes of every content package the server told it to load, and apparentl
by airza 11y ago
> we'd inexplicably get a crash in printf [..] The client in debug would print out the hashes of every content package the server told it to load, and apparently one of them (on this build) had a % in the hash. We couldn't figure out a reasonable fix for it, but #ifndef PS3 worked just fine until the next data build
Friends don't let friends printf(str).
- Kenji 11y agoI didn't really understand that problem. They couldn't fix this?? Like, they didn't know how to escape/replace percent signs or print differently? Maybe I am missing something but it does not look like a particularly elusive problem.
- bananaboy 11y agoYeah I thought that one was weird too. Also I wouldn't really call it much of a dirty coding trick if it was just something that was hacked in during development! Many times I've #ifndef <someplatform> because something or other didn't work on that platform. Then later before shipping you fix/implement it!
- pandaman 11y agoHow I understand is that they had printf(x) somewhere and some values of x included the '%' character. If this has been inside the UE and the x itself was a hash value then both replacing with printf("%s",x) and changing the x's value could be problematic.