Merge pull request #233 from KLayout/issue-232

Fixed #232 by limiting the allowed number of string to the maximum su…
This commit is contained in:
Matthias Köfferlein 2019-02-23 18:15:17 +01:00 committed by GitHub
commit 61dd796f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -722,8 +722,8 @@ DitherPatternInfo::from_strings (const std::vector<std::string> &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);