mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-06 18:33:13 +03:00
Handle leading or trailing spaces in config list entries on Windows
Fixes issue with Cmdr names with trailing spaces.
This commit is contained in:
parent
f86a3ecb69
commit
7b649e936f
@ -235,7 +235,7 @@ class Config:
|
|||||||
if RegQueryValueEx(self.hkey, key, 0, ctypes.byref(typ), buf, ctypes.byref(size)):
|
if RegQueryValueEx(self.hkey, key, 0, ctypes.byref(typ), buf, ctypes.byref(size)):
|
||||||
return None
|
return None
|
||||||
elif typ.value == REG_MULTI_SZ:
|
elif typ.value == REG_MULTI_SZ:
|
||||||
return [x.strip() for x in ctypes.wstring_at(buf, len(buf)-2).split(u'\x00')]
|
return [x for x in ctypes.wstring_at(buf, len(buf)-2).split(u'\x00')]
|
||||||
else:
|
else:
|
||||||
return buf.value
|
return buf.value
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user