]> granicus.if.org Git - python/commit
getpath.c: fix test to detech PyUnicode_AsWideChar() failure
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 10 Nov 2010 14:12:20 +0000 (14:12 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 10 Nov 2010 14:12:20 +0000 (14:12 +0000)
commit47f637ce17022464307b093cee6f367e2dc7f024
tree0c342696dbe02e4e8449747f6b4d2ab9e0b1dcd6
parentcf9f98034a6bc7c55486042da1867447cfd2f0b5
getpath.c: fix test to detech PyUnicode_AsWideChar() failure

PyUnicode_AsWideChar() result is signed, whereas it was stored in a unsigned
variable, and then the test was "n >= 0" which is always true to an unsigned
number. Patch written by Hallvard B Furuseth.
Modules/getpath.c