summaryrefslogtreecommitdiff
path: root/src/common/strlib.c
diff options
context:
space:
mode:
authorIbrahem Hossam <hemagx2@gmail.com>2016-04-16 15:37:47 +0200
committerIbrahem Hossam <hemagx2@gmail.com>2016-04-16 15:37:47 +0200
commitbbcb0406e5a430d1c85b3448f88a72f342530cf0 (patch)
treecc2348d9a18ea4d7e462e0247aeb8d23a1808abf /src/common/strlib.c
parentc7410453a15110a12d9fffb06b70e9557fb9f73a (diff)
parent8448e3f8cdcbf820e304a68c7507a0ed96d53544 (diff)
downloadhercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.gz
hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.bz2
hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.xz
hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.zip
Merge pull request #1255 from HerculesWS/login-clif_rewrite
Diffstat (limited to 'src/common/strlib.c')
-rw-r--r--src/common/strlib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 997b01ffa..8f164f2e9 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -424,13 +424,12 @@ int strlib_strline(const char *str, size_t pos)
/// @param output Output string
/// @param input Binary input buffer
/// @param count Number of bytes to convert
-bool strlib_bin2hex(char *output, unsigned char *input, size_t count)
+bool strlib_bin2hex(char *output, const unsigned char *input, size_t count)
{
char toHex[] = "0123456789abcdef";
size_t i;
- for( i = 0; i < count; ++i )
- {
+ for (i = 0; i < count; ++i) {
*output++ = toHex[(*input & 0xF0) >> 4];
*output++ = toHex[(*input & 0x0F) >> 0];
++input;