From: Maxim Mamontov Date: Sat, 10 Sep 2011 16:54:09 +0000 (+0300) Subject: Fix service payDay type for correct work on 32/64-bit X-Git-Tag: 2.408-rc1~88 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/2395ee39f86d9ec56e74c3d8dd388b3d2c2e1aaf?ds=inline;hp=c95017a05556ee19d801a680689511e4ca56bc1c Fix service payDay type for correct work on 32/64-bit --- 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; }