fix ambiguity

This commit is contained in:
Marc Wäckerlin
2015-08-17 14:47:35 +00:00
parent 7c79dcb564
commit b60e52fa4f

View File

@@ -179,7 +179,7 @@ namespace crypto {
/// convert integer to binary of given size
inline std::string toBinary(unsigned long data, int bytes=2) {
std::string res(0, bytes);
std::string res('\0', bytes);
for (int i(0); i<bytes; ++i) {
res[i] = std::string::value_type(data&0xff);
data>>=8;