Fix endless loop since grandparent commit

This commit is contained in:
est31 2015-07-04 19:43:46 +02:00
parent c53520aa31
commit 64dc053209

@ -242,12 +242,13 @@ static std::string craftDumpMatrix(const std::vector<std::string> &items,
{ {
std::ostringstream os(std::ios::binary); std::ostringstream os(std::ios::binary);
os << "{ "; os << "{ ";
unsigned int x = 0;
for(std::vector<std::string>::size_type i = 0; for(std::vector<std::string>::size_type i = 0;
i < items.size(); i++) { i < items.size(); i++, x++) {
if (i == width) { if (x == width) {
os << "; "; os << "; ";
i = 0; x = 0;
} else if (i != 0) { } else if (x != 0) {
os << ","; os << ",";
} }
os << '"' << items[i] << '"'; os << '"' << items[i] << '"';
@ -262,12 +263,13 @@ std::string craftDumpMatrix(const std::vector<ItemStack> &items,
{ {
std::ostringstream os(std::ios::binary); std::ostringstream os(std::ios::binary);
os << "{ "; os << "{ ";
unsigned int x = 0;
for (std::vector<ItemStack>::size_type i = 0; for (std::vector<ItemStack>::size_type i = 0;
i < items.size(); i++) { i < items.size(); i++, x++) {
if (i == width) { if (x == width) {
os << "; "; os << "; ";
i = 0; x = 0;
} else if (i != 0) { } else if (x != 0) {
os << ","; os << ",";
} }
os << '"' << (items[i].getItemString()) << '"'; os << '"' << (items[i].getItemString()) << '"';