Skip to content

Commit 62304de

Browse files
committed
Fix title/users nonsense
1 parent 40c9f43 commit 62304de

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/components/PVutils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ export function getPvValue(
6060
return updatedPV.text;
6161
} else if (updatedPV.b64byt != null) {
6262
// PV value is base64 encoded
63-
return Buffer.from(updatedPV.b64byt, "base64").toString("utf-8");
63+
const buffer = Buffer.from(updatedPV.b64byt, "base64");
64+
const end = buffer.indexOf(0);
65+
if (end !== -1) {
66+
return buffer.toString("utf8", 0, end);
67+
} else {
68+
return buffer.toString("utf8");
69+
}
6470
} else if (updatedPV.value != null) {
6571
// PV value is a number
6672
return updatedPV.value;

0 commit comments

Comments
 (0)