]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
Fix rpcconfig plugin compilation errors
[stg.git] / projects / stargazer / plugins / store / postgresql / postgresql_store_users.cpp
index 2c66cc7f425fb4b251b2c3ef57bbf3bef365b456..c1c48e250673c141f816cec40c0e77c087fa5363 100644 (file)
 
 #include <libpq-fe.h>
 
-#include "stg_const.h"
-#include "postgresql_store.h"
-#include "stg_locker.h"
+#include "stg/stg_const.h"
+#include "stg/stg_locker.h"
 #include "../../../stg_timer.h"
+#include "postgresql_store.h"
 
 //-----------------------------------------------------------------------------
 int POSTGRESQL_STORE::GetUsersList(vector<string> * usersList) const
@@ -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);
+            }
         }
     }