christoph2 / pyxcp

ASAM XCP in Python
http://pyxcp.rtfd.org
GNU Lesser General Public License v3.0
207 stars 64 forks source link

use_ctypes return of getKey fails when key has null character in it #87

Closed still-learnin closed 2 years ago

still-learnin commented 2 years ago

kb which is returned from the getKey() method is a string buffer. Therefore the return value is truncated at the first null character. One solution would be to slice kb so that the complete key is returned:

    return (retCode, kb[0:kl.value])