From f40d437a96a9068af3e4b8d0427ea8114f08cec4 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 23 Feb 2019 09:52:14 +0100 Subject: [PATCH] Fixed #232 by limiting the allowed number of string to the maximum supported stipple height (32). --- src/laybasic/laybasic/layDitherPattern.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/laybasic/laybasic/layDitherPattern.cc b/src/laybasic/laybasic/layDitherPattern.cc index c3fbd3085b..5326c8c935 100644 --- a/src/laybasic/laybasic/layDitherPattern.cc +++ b/src/laybasic/laybasic/layDitherPattern.cc @@ -722,8 +722,8 @@ DitherPatternInfo::from_strings (const std::vector &strv) data[l] = 0; } - for (size_t i = 0; i < strv.size (); ++i) { - uint_from_string (strv [strv.size () - 1 - i].c_str (), data [i], w); + for (size_t i = 0; i < h; ++i) { + uint_from_string (strv [h - 1 - i].c_str (), data [i], w); } set_pattern (data, w, h);