Skip to content

Commit a03d373

Browse files
committed
Fix build.
1 parent 67947a5 commit a03d373

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Common/Cpp/BitmapConversion.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// 2. Proper padding handling
77
// 3. Explicit character validation
88

9-
#include <string>
10-
#include <vector>
9+
#include "BitmapConversion.h"
1110

1211
static const std::string BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1312
"abcdefghijklmnopqrstuvwxyz"
@@ -74,7 +73,7 @@ bool base64_decode(std::string &out, const std::string &in) {
7473
char_array_4[i++] = c;
7574
if (i == 4) {
7675
for (i = 0; i < 4; i++)
77-
char_array_4[i] = BASE64_CHARS.find(char_array_4[i]);
76+
char_array_4[i] = (unsigned char)BASE64_CHARS.find(char_array_4[i]);
7877

7978
char_array_3[0] =
8079
(char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
@@ -93,7 +92,7 @@ bool base64_decode(std::string &out, const std::string &in) {
9392
char_array_4[j] = 0;
9493

9594
for (j = 0; j < 4; j++)
96-
char_array_4[j] = BASE64_CHARS.find(char_array_4[j]);
95+
char_array_4[j] = (unsigned char)BASE64_CHARS.find(char_array_4[j]);
9796

9897
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
9998
char_array_3[1] =

Common/Cpp/BitmapConversion.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#ifndef PokemonAutomation_BitmapCompression_H
1919
#define PokemonAutomation_BitmapCompression_H
2020

21+
#include <string>
2122
#include <vector>
2223

2324
std::string pack_bits_to_string(const std::vector<bool> &vec);
@@ -28,4 +29,4 @@ std::string pack_bit_vector_to_base64(const std::vector<bool> &vec);
2829

2930
std::vector<bool> unpack_bit_vector_from_base64(const std::string &b64, size_t original_size);
3031

31-
#endif
32+
#endif

0 commit comments

Comments
 (0)