]> git.cworth.org Git - apitrace/commit
Mac OS X: Fix getProcessName() to avoid assertion failure in truncate
authorCarl Worth <cworth@cworth.org>
Wed, 2 Nov 2011 00:31:28 +0000 (17:31 -0700)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 3 Nov 2011 11:44:31 +0000 (11:44 +0000)
commit9b42f061b37a00a0bcd314a830924803a956e17d
tree93d383392c1b7e2c22fe6c1e4126d917d1ac625a
parent2744092b277b41ebc15d24b3293ecccbfa5d1237
Mac OS X: Fix getProcessName() to avoid assertion failure in truncate

Apparently _NSGetExecutablePath doesn't actually set the len field in
the case of successfully copying a value to buf. In this case, the
value in buf is properly terminated, so we can just use strlen to find
a legal value to use when calling truncate.
common/os_posix.cpp