Fixed memory view for C/C++ strings

This commit is contained in:
WebFreak001 2016-08-11 19:52:25 +02:00
commit d3b0bb79a1

View file

@ -1,6 +1,7 @@
const resultRegex = /^([a-zA-Z_\-][a-zA-Z0-9_\-]*)\s*=\s*/;
const variableRegex = /^[a-zA-Z_\-][a-zA-Z0-9_\-]*/;
const errorRegex = /^\<.+?\>/;
const referenceStringRegex = /^(0x[0-9a-fA-F]+\s*)"/;
const referenceRegex = /^0x[0-9a-fA-F]+/;
const nullpointerRegex = /^0x0+\b/;
const charRegex = /^(\d+) ['"]/;
@ -156,6 +157,10 @@ export function expandValue(variableCreate: Function, value: string, root: strin
primitive = "<nullptr>";
value = value.substr(3).trim();
}
else if (match = referenceStringRegex.exec(value)) {
value = value.substr(match[1].length);
primitive = parseCString();
}
else if (match = referenceRegex.exec(value)) {
primitive = "*" + match[0];
value = value.substr(match[0].length).trim();