diff --git a/structparser.py b/structparser.py index c7184d2..cf97a9c 100644 --- a/structparser.py +++ b/structparser.py @@ -148,7 +148,7 @@ class StructParser: type_ = str, 1 elif def_["type"] == "wstring": type_ = str, 2 - if def_["type"] in ("char", "wchar", "float", "double"): + elif def_["type"] in ("char", "wchar", "float", "double"): type_ = vars(ctypes)["c_"+def_["type"]] # the rest of types are in the format (s|u) elif def_["type"].startswith("s"):