Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/filesystem')
-rw-r--r--src/filesystem/inistream.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filesystem/inistream.cc b/src/filesystem/inistream.cc
index d07745b..54400d0 100644
--- a/src/filesystem/inistream.cc
+++ b/src/filesystem/inistream.cc
@@ -209,6 +209,8 @@ bool IniStream::got_key_color(const char * keylabel, math::Color & color)
if ((r > 1.0f) || (g > 1.0f) || (b > 1.0f)) {
if (is >> a) {
a /= 255.0f;
+ } else {
+ a = 1.0f;
}
r /= 255.0f;
g /= 255.0f;
@@ -218,9 +220,9 @@ bool IniStream::got_key_color(const char * keylabel, math::Color & color)
a = 1.0f;
}
}
- color = math::Color(r, g, b, a);
+ color.assign(r, g, b, a);
} else {
- color = math::Color();
+ color.assign(1.0f, 1.0f);
}
return true;
} else {