Fixed MPC crashes when trying to open YouTube videos with emojis (#328)

* Fixed crashes when trying to open YouTube videos with emojis
This commit is contained in:
Borislav Draganov 2020-08-06 15:12:49 +03:00 committed by GitHub
parent 1ad10632c6
commit be92ff8b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class MpcHcApi:
_fields_ = [
('nMsgPos', ctypes.c_int32),
('nDurationMS', ctypes.c_int32),
('strMsg', ctypes.c_wchar * (len(message) + 1))
('strMsg', ctypes.c_wchar * (len(message.encode('utf-8')) + 1))
]
cmessage = __OSDDATASTRUCT()
cmessage.nMsgPos = MsgPos