Browse Source

Fixed error: Would crash often if only one foreground color.

tags/0.3.4
tastytea 6 months ago
parent
commit
211b0ba7b4
Signed by: tastytea <tastytea@tastytea.de> GPG Key ID: CFC39497F1B26E07
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      CMakeLists.txt
  2. 1
    1
      src/identiconpp.cpp

+ 1
- 1
CMakeLists.txt View File

@@ -1,6 +1,6 @@
1 1
 cmake_minimum_required (VERSION 3.2)
2 2
 project(identiconpp
3
-        VERSION 0.3.3
3
+        VERSION 0.3.4
4 4
         LANGUAGES CXX
5 5
 )
6 6
 

+ 1
- 1
src/identiconpp.cpp View File

@@ -133,7 +133,7 @@ Magick::Color Identiconpp::get_color(const uint16_t firstbit,
133 133
     // a power of 2.
134 134
     if (bits > (_foreground.size() - 1))
135 135
     {
136
-        bits -= (_foreground.size() - 1);
136
+        bits -= _foreground.size();
137 137
     }
138 138
 
139 139
     // Lookup und set color

Loading…
Cancel
Save