We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40c9f43 commit 62304deCopy full SHA for 62304de
app/components/PVutils.ts
@@ -60,7 +60,13 @@ export function getPvValue(
60
return updatedPV.text;
61
} else if (updatedPV.b64byt != null) {
62
// PV value is base64 encoded
63
- return Buffer.from(updatedPV.b64byt, "base64").toString("utf-8");
+ 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
+ }
70
} else if (updatedPV.value != null) {
71
// PV value is a number
72
return updatedPV.value;
0 commit comments