summaryrefslogtreecommitdiff
path: root/webext-surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2024-03-17 08:06:01 +0100
committerRafael Marçalo <raroma09@gmail.com>2024-06-10 21:13:36 +0100
commit4f9bfddabcece70d3e2e028b1658715dd20a9274 (patch)
tree617934c26fdaef4f5d2a2af5f953a8f521120192 /webext-surf.c
parentdd27aea9f41bedebd8a593816a3755011dbb3642 (diff)
Fix message sizes for web extension communication
Diffstat (limited to 'webext-surf.c')
-rw-r--r--webext-surf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/webext-surf.c b/webext-surf.c
index f09714e..84191f3 100644
--- a/webext-surf.c
+++ b/webext-surf.c
@@ -39,7 +39,7 @@ readsock(GIOChannel *s, GIOCondition c, gpointer unused)
}
if (msgsz < 2) {
- fprintf(stderr, "webext: readsock: message too short: %d\n",
+ fprintf(stderr, "webext: readsock: message too short: %lu\n",
msgsz);
return TRUE;
}
@@ -54,7 +54,7 @@ readsock(GIOChannel *s, GIOCondition c, gpointer unused)
if (msgsz != 3)
return TRUE;
snprintf(js, sizeof(js),
- "window.scrollBy(window.innerWidth/100*%d,0);",
+ "window.scrollBy(window.innerWidth/100*%hhd,0);",
msg[2]);
jsc_context_evaluate(jsc, js, -1);
break;
@@ -62,7 +62,7 @@ readsock(GIOChannel *s, GIOCondition c, gpointer unused)
if (msgsz != 3)
return TRUE;
snprintf(js, sizeof(js),
- "window.scrollBy(0,window.innerHeight/100*%d);",
+ "window.scrollBy(0,window.innerHeight/100*%hhd);",
msg[2]);
jsc_context_evaluate(jsc, js, -1);
break;