Browse Source

Misc

tags/1.9.5
falkTX 10 years ago
parent
commit
fde9898954
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      source/carla_backend.py

+ 5
- 5
source/carla_backend.py View File

@@ -67,12 +67,12 @@ else:
# ------------------------------------------------------------------------------------------------------------
# Convert a ctypes c_char_p into a python string

def charPtrToString(value):
if not value:
def charPtrToString(charPtr):
if not charPtr:
return ""
if isinstance(value, str):
return value
return value.decode("utf-8", errors="ignore")
if isinstance(charPtr, str):
return charPtr
return charPtr.decode("utf-8", errors="ignore")

# ------------------------------------------------------------------------------------------------------------
# Convert a ctypes POINTER(c_char_p) into a python string list


Loading…
Cancel
Save