From: Maxim Mamontov Date: Thu, 30 Dec 2010 12:24:44 +0000 (+0200) Subject: Исправлена старая ошибка с "перепутыванием" полей userdata X-Git-Tag: 2.407-rc3~220 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/7390772f1d864c2312489a37f2bdcbbcf2b88d74?ds=sidebyside;hp=9e2edd39ec2cb1989f6261b1dc5e6c09373ee33d Исправлена старая ошибка с "перепутыванием" полей userdata --- diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp index 2c66cc7f..7d8b3b93 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp @@ -906,7 +906,11 @@ for (int i = 0; i < tuples; ++i) } else { - conf->userdata[i] = PQgetvalue(result, i, 1); + if (num < USERDATA_NUM && + num >= 0) + { + conf->userdata[num] = PQgetvalue(result, i, 1); + } } }