From 2395ee39f86d9ec56e74c3d8dd388b3d2c2e1aaf Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 10 Sep 2011 19:54:09 +0300 Subject: [PATCH] Fix service payDay type for correct work on 32/64-bit --- include/stg/service_conf.h | 4 +++- .../plugins/store/firebird/firebird_store_services.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/stg/service_conf.h b/include/stg/service_conf.h index 5f015d0b..ef487f8e 100644 --- a/include/stg/service_conf.h +++ b/include/stg/service_conf.h @@ -3,6 +3,8 @@ #include +#include "os_int.h" + struct SERVICE_CONF { SERVICE_CONF() @@ -25,7 +27,7 @@ SERVICE_CONF(const std::string & n, double c, std::string name; std::string comment; double cost; -unsigned payDay; +uint8_t payDay; }; inline diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp index f7167acb..84eab5fa 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp @@ -80,7 +80,7 @@ try where name = ?"); st->Set(1, sc.comment); st->Set(2, sc.cost); - st->Set(3, static_cast(sc.payDay)); + st->Set(3, static_cast(sc.payDay)); st->Set(4, sc.name); st->Execute(); tr->Commit(); @@ -115,7 +115,7 @@ try { st->Get(3, sc->comment); st->Get(4, sc->cost); - long pd; + int16_t pd; st->Get(5, pd); sc->payDay = pd; } -- 2.44.2