diff options
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index a9306efc..848f81c7 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -851,7 +851,7 @@ void tox_callback_friend_message(Tox *tox, tox_friend_message_cb *function, void | |||
851 | 851 | ||
852 | bool tox_hash(uint8_t *hash, const uint8_t *data, size_t length) | 852 | bool tox_hash(uint8_t *hash, const uint8_t *data, size_t length) |
853 | { | 853 | { |
854 | if (!hash || !data) { | 854 | if (!hash || (length && !data)) { |
855 | return 0; | 855 | return 0; |
856 | } | 856 | } |
857 | 857 | ||