Kbase P126670: Error: 'Can't PUT past the end of the MEMPTR. (4791)' getting length() of character string containin
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/16/2010 |
|
Status: Unverified
SYMPTOM(s):
Can't PUT past the end of the MEMPTR. (4791)
Application uses LENGTH(<SomeString>, "CHARACTER") to determine length of a string.
String <SomeString> contains non-printable (invisible) multi-byte characters.
Result of LENGTH(string-var, "CHARACTER") is used to set the size of a MEMPTR variable to hold a string:
SET-SIZE(memptr-var) = LENGTH(string-var, "CHARACTER") + 1.
Assigning the string string-var to the MEMPTR variable results in system error 4791
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
LENGTH(string-var, "CHARACTER") will return length in characters, including double-byte characters.
FIX:
Use LENGTH(string-var, "RAW") to express the length of the variable in bytes or ensure that string-var does not contain double-byte charactrers.