diff options
Diffstat (limited to 'source/settings/CodeForm.mc')
| -rw-r--r-- | source/settings/CodeForm.mc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/settings/CodeForm.mc b/source/settings/CodeForm.mc index 810cd6e..0c3470c 100644 --- a/source/settings/CodeForm.mc +++ b/source/settings/CodeForm.mc @@ -89,8 +89,14 @@ module CodeForm { // The contents as stored (trimmed for linear codes, whose digits are // often typed with spaces around), or the problem. function contents(text as String, symbology as Number) as ByteArray or String { - var value = Codes.isLinear(symbology) ? Text.trim(text) : text; - if (Text.trim(value).length() == 0) { + return contentsOf(text, Text.trim(text), symbology); + } + + // As contents(), with the text already trimmed (ManageRun trims + // kilobytes in steps). + function contentsOf(text as String, trimmed as String, symbology as Number) as ByteArray or String { + var value = Codes.isLinear(symbology) ? trimmed : text; + if (trimmed.length() == 0) { return "Contents: missing"; } var bytes = Bytes.fromUtf8(value); |
