summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-03 01:28:58 +0100
committerMattes D <github@xoft.cz>2015-03-03 01:28:58 +0100
commitd4b505db025b05379ac9a5df923a60f0d37eed9a (patch)
tree309229d5dcb53f33b601d4c3ecba03d732c3d486 /src/Bindings
parentMerge pull request #1781 from mc-server/Vines (diff)
downloadcuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar.gz
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar.bz2
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar.lz
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar.xz
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.tar.zst
cuberite-d4b505db025b05379ac9a5df923a60f0d37eed9a.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/ManualBindings.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index a6ae4869b..cac81f325 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2392,10 +2392,10 @@ static int tolua_md5HexString(lua_State * tolua_S)
// Convert the md5 checksum to hex string:
std::stringstream Output;
- Output << std::hex << std::setw(2) << std::setfill('0');
+ Output << std::hex << std::setfill('0');
for (size_t i = 0; i < ARRAYCOUNT(md5Output); i++)
{
- Output << static_cast<unsigned short>(md5Output[i]); // Need to cast to a number, otherwise a char is output
+ Output << std::setw(2) << static_cast<unsigned short>(md5Output[i]); // Need to cast to a number, otherwise a char is output
}
lua_pushlstring(tolua_S, Output.str().c_str(), Output.str().size());
return 1;
@@ -2438,10 +2438,10 @@ static int tolua_sha1HexString(lua_State * tolua_S)
// Convert the sha1 checksum to hex string:
std::stringstream Output;
- Output << std::hex << std::setw(2) << std::setfill('0');
+ Output << std::hex << std::setfill('0');
for (size_t i = 0; i < ARRAYCOUNT(sha1Output); i++)
{
- Output << static_cast<unsigned short>(sha1Output[i]); // Need to cast to a number, otherwise a char is output
+ Output << std::setw(2) << static_cast<unsigned short>(sha1Output[i]); // Need to cast to a number, otherwise a char is output
}
lua_pushlstring(tolua_S, Output.str().c_str(), Output.str().size());
return 1;