summaryrefslogtreecommitdiff
path: root/solenv/gdb/libreoffice/util/string.py
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gdb/libreoffice/util/string.py')
-rw-r--r--solenv/gdb/libreoffice/util/string.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/solenv/gdb/libreoffice/util/string.py b/solenv/gdb/libreoffice/util/string.py
index 4583f5960ae1..9f7cb70028b5 100644
--- a/solenv/gdb/libreoffice/util/string.py
+++ b/solenv/gdb/libreoffice/util/string.py
@@ -52,15 +52,15 @@ class StringPrinterHelper(object):
if not encoding:
encoding = ''
- if use_lazy_string:
- return data.lazy_string(encoding, length)
-
# we need to determine length, if not given (for sal_Unicode*)
if length < 0:
length = 0
while data[length] != 0 and length <= 512: # arbitrary limit
length += 1
+ if use_lazy_string:
+ return data.lazy_string(encoding, length)
+
# The gdb.Value.string() conversion works on array of bytes, but
# the length we have is the length of the string. So we must
# multiply it by width of character if the string is Unicode.