openbsd-ports/security/libnipper/patches/patch-device_crypto_crypto-base64_cpp

19 lines
852 B
Plaintext
Raw Normal View History

let it build with base gcc
$OpenBSD: patch-device_crypto_crypto-base64_cpp,v 1.1.1.1 2008/09/20 20:26:05 steven Exp $
--- device/crypto/crypto-base64.cpp.orig Sun Sep 7 23:03:17 2008
+++ device/crypto/crypto-base64.cpp Sun Sep 7 23:03:17 2008
@@ -110,9 +110,9 @@ const char *Device::base64Decode(const char *encodedSt
offset++;
// Convert 4 6 bit characters into 3 8 bit ones...
- base64TempString.append(1, ((inter1 << 2) | (inter2 >> 4)));
- base64TempString.append(1, (((inter2 << 4) & 240) | (inter3 >> 2)));
- base64TempString.append(1, (((inter3 << 6) & 192)| inter4));
+ base64TempString.append(1, (char) ((inter1 << 2) | (inter2 >> 4)));
+ base64TempString.append(1, (char) (((inter2 << 4) & 240) | (inter3 >> 2)));
+ base64TempString.append(1, (char) (((inter3 << 6) & 192)| inter4));
}
return base64TempString.c_str();