From 08b22dd5bbb3a1f90d036ec99a0128041d60bb82 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Mon, 8 Feb 2016 22:27:00 +0200 Subject: [PATCH] Fix uint32_t errors (VS 2013) Thanks to Foereaper for testing. --- ElunaUtility.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ElunaUtility.cpp b/ElunaUtility.cpp index 0a9c440..c0ed224 100644 --- a/ElunaUtility.cpp +++ b/ElunaUtility.cpp @@ -134,11 +134,11 @@ void ElunaUtil::EncodeData(const unsigned char* data, size_t input_length, std:: for (size_t i = 0, j = 0; i < input_length;) { - uint32_t octet_a = i < input_length ? (unsigned char)data[i++] : 0; - uint32_t octet_b = i < input_length ? (unsigned char)data[i++] : 0; - uint32_t octet_c = i < input_length ? (unsigned char)data[i++] : 0; + uint32 octet_a = i < input_length ? (unsigned char)data[i++] : 0; + uint32 octet_b = i < input_length ? (unsigned char)data[i++] : 0; + uint32 octet_c = i < input_length ? (unsigned char)data[i++] : 0; - uint32_t triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c; + uint32 triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c; buffer[j++] = encoding_table[(triple >> (3 * 6)) & 0x3F]; buffer[j++] = encoding_table[(triple >> (2 * 6)) & 0x3F]; @@ -186,12 +186,12 @@ unsigned char* ElunaUtil::DecodeData(const char *data, size_t *output_length) for (size_t i = 0, j = 0; i < input_length;) { - uint32_t sextet_a = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; - uint32_t sextet_b = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; - uint32_t sextet_c = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; - uint32_t sextet_d = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; + uint32 sextet_a = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; + uint32 sextet_b = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; + uint32 sextet_c = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; + uint32 sextet_d = data[i] == '=' ? 0 & i++ : decoding_table[(unsigned char)data[i++]]; - uint32_t triple = (sextet_a << (3 * 6)) + uint32 triple = (sextet_a << (3 * 6)) + (sextet_b << (2 * 6)) + (sextet_c << (1 * 6)) + (sextet_d << (0 * 6));