From 9ed203c0cb137997241e3094a9430ef593d2b1f0 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 15 Nov 2011 16:16:38 -0500 Subject: Fixed crash on shutdown & a compiler warning --- modules/database/db_sql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/database/db_sql.cpp') diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index e083204d4..775c23123 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -172,10 +172,10 @@ class DBSQL : public Module SQLQuery query("SELECT * FROM `" + sb->GetName() + "`"); SQLResult res = this->sql->RunQuery(query); - for (int i = 0; i < res.Rows(); ++i) + for (int j = 0; j < res.Rows(); ++j) { Serializable::serialized_data data; - const std::map &row = res.Row(i); + const std::map &row = res.Row(j); for (std::map::const_iterator rit = row.begin(), rit_end = row.end(); rit != rit_end; ++rit) data[rit->first] << rit->second; -- cgit