From bbde62307a2c7989c91e9314756ca09839b077fa Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 24 Dec 2019 19:07:08 +0100 Subject: [PATCH] Minor syntax issues in panels --- libr/core/panels.c | 18 +++++++++--------- libr/util/strbuf.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libr/core/panels.c b/libr/core/panels.c index 74a743dc83..17329af044 100644 --- a/libr/core/panels.c +++ b/libr/core/panels.c @@ -1718,15 +1718,15 @@ void __handleComment(RCore *core) { strcpy (buf, "CC-"); } else { switch (buf[i]) { - case '-': - memcpy (buf, "\"CC-\x00", 5); - break; - case '!': - memcpy (buf, "\"CC!\x00", 5); - break; - default: - memcpy (buf, "\"CC ", 4); - break; + case '-': + memcpy (buf, "\"CC-", 5); + break; + case '!': + memcpy (buf, "\"CC!", 5); + break; + default: + memcpy (buf, "\"CC ", 4); + break; } strcat (buf, "\""); } diff --git a/libr/util/strbuf.c b/libr/util/strbuf.c index f69a606928..cf28baab48 100644 --- a/libr/util/strbuf.c +++ b/libr/util/strbuf.c @@ -87,7 +87,7 @@ R_API bool r_strbuf_setbin(RStrBuf *sb, const ut8 *s, int l) { sb->ptr = ptr; } memcpy (ptr, s, l); - *(ptr + l) = 0; + ptr[l] = 0; } else { R_FREE (sb->ptr); sb->ptr = NULL;