Skip to content

Commit 1aeb3fc

Browse files
committed
Check if the descriptors from Quark rules miss a semicolon at the end
1 parent 879cd9e commit 1aeb3fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

quark/core/struct/ruleobject.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ def __init__(self, ruleJson: os.PathLike, jsonData: dict = None) -> None:
4646
if not self._api[index]["class"].endswith(";"):
4747
self._api[index]["class"] += ";"
4848

49+
# Check if the return type misses a semicolon at the end.
50+
descriptor = self._api[index]["descriptor"]
51+
if '/' in descriptor[descriptor.index(')'):] and \
52+
not descriptor.endswith(';'):
53+
self._api[index]["descriptor"] += ";"
54+
4955
descriptor = self._api[index]["descriptor"]
5056
if " " not in descriptor:
5157
self._api[index][

0 commit comments

Comments
 (0)