aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/p-lang.c')
-rw-r--r--gdb/p-lang.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index bcb2427..2b4720d 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -253,7 +253,8 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype,
return;
}
- for (i = 0; i < length && things_printed < options->print_max; ++i)
+ unsigned int print_max_chars = get_print_max_chars (options);
+ for (i = 0; i < length && things_printed < print_max_chars; ++i)
{
/* Position of the character we are examining
to see whether it is repeated. */