git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add assertions on OpenSearch result
[stg.git]
/
projects
/
stargazer
/
plugins
/
configuration
/
sgconfig
/
parser_tariff.cpp
diff --git
a/projects/stargazer/plugins/configuration/sgconfig/parser_tariff.cpp
b/projects/stargazer/plugins/configuration/sgconfig/parser_tariff.cpp
index aeb1c7832a293abd1f184916b1205a1c298b61c1..9bac0294bbc171d731ea169813cea5c14e58b966 100644
(file)
--- a/
projects/stargazer/plugins/configuration/sgconfig/parser_tariff.cpp
+++ b/
projects/stargazer/plugins/configuration/sgconfig/parser_tariff.cpp
@@
-1,6
+1,7
@@
-//#include <stdio.h>
+#include <cstdio> // snprintf
#include <cstring>
#include <cstring>
+#include "stg/tariffs.h"
#include "parser.h"
const int pt_mega = 1024 * 1024;
#include "parser.h"
const int pt_mega = 1024 * 1024;
@@
-387,7
+388,10
@@
else
snprintf(st, 50, "Time%d", j);
if (strcasecmp(el, st) == 0)
{
snprintf(st, 50, "Time%d", j);
if (strcasecmp(el, st) == 0)
{
- int h1, m1, h2, m2;
+ int h1 = 0;
+ int m1 = 0;
+ int h2 = 0;
+ int m2 = 0;
if (ParseTariffTimeStr(attr[1], h1, m1, h2, m2) == 0)
{
td.dirPrice[j].hDay = h1;
if (ParseTariffTimeStr(attr[1], h1, m1, h2, m2) == 0)
{
td.dirPrice[j].hDay = h1;