Skip to content

Commit 8735186

Browse files
waskyosipma
authored andcommitted
REP: If length argument is None, let that stay so json does the right thing
We were converting it to a string with becomes 'None' which then throws off the json parser
1 parent 6882cd9 commit 8735186

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chb/buffer/LibraryCallCallsites.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ def to_json_result(self, app: 'AppAccess') -> JSONResult:
293293
content["buffersize"] = buffersize
294294
content["target-function"] = self.summary.name
295295
content["stack-offset"] = dstoffset
296-
content["length-argument"] = str(self.lenarg)
296+
if self.lenarg is not None:
297+
content["length-argument"] = str(self.lenarg)
298+
else:
299+
content["length-argument"] = None
297300
content["spare"] = spare
298301

299302
return JSONResult("librarycallsideeffect", content, "ok")

0 commit comments

Comments
 (0)