Bug #2386
STRING(memptr_var) will render the contents of the memptr as a null terminated string
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Greg Shah almost 12 years ago
See uast/memptr/memptr_to_string.p.
In the 4GL, the contents seem to be read from index 1 (1-based indexing) and include anything up to the null terminator byte. It probably just does an implicit GET-STRING(var, 1).
The current memptr.toString() implementation just returns an empty string (or "?" if unknown).
Check the following edge cases:
- Uninitialized memptr.
- 0-sized memptr (should be the same thing as uninitialized).
- Unknown value memptr.
Based on the testing results, fix the memptr.toString() implementation.