Plain chars are currently used for messaging, but sometimes negative values are 
sent, e.g. in scrollv. on x86 this doesn't cause a problem but chars are 
unsigned on my arm computer.

---
surf.c | 4 ++--
webext-surf.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/surf.c b/surf.c
index af0fa74..5d0dddd 100644
--- a/surf.c
+++ b/surf.c
@@ -1222,7 +1222,7 @@ newview(Client *c, WebKitWebView *rv)
static gboolean
readsock(GIOChannel *s, GIOCondition ioc, gpointer unused)
{
- static char msg[MSGBUFSZ];
+ static signed char msg[MSGBUFSZ];
GError *gerr = NULL;
gsize msgsz;

@@ -1856,7 +1856,7 @@ zoom(Client *c, const Arg *a)
static void
msgext(Client *c, char type, const Arg *a)
{
- static char msg[MSGBUFSZ];
+ static signed char msg[MSGBUFSZ];
int ret;

if (spair[0] < 0)
diff --git a/webext-surf.c b/webext-surf.c
index d087219..4056e07 100644
--- a/webext-surf.c
+++ b/webext-surf.c
@@ -21,7 +21,7 @@ static int sock;
static void
msgsurf(guint64 pageid, const char *s)
{
- static char msg[MSGBUFSZ];
+ static signed char msg[MSGBUFSZ];
size_t sln = strlen(s);
int ret;

@@ -38,7 +38,8 @@ msgsurf(guint64 pageid, const char *s)
static gboolean
readsock(GIOChannel *s, GIOCondition c, gpointer unused)
{
- static char js[48], msg[MSGBUFSZ];
+ static char js[48];
+ static signed char msg[MSGBUFSZ];
WebKitWebPage *page;
JSCContext *jsc;
GError *gerr = NULL;
--
2.33.0

Reply via email to