Skip to content

Commit 85e1ebc

Browse files
committed
fix alignment issue
1 parent 4737569 commit 85e1ebc

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.13.2.9005
4+
Version: 0.13.2.9006
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library implementing 'Scalability Protocols', a reliable,
77
high-performance standard for common communications patterns including

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 0.13.2.9005 (development)
1+
# nanonext 0.13.2.9006 (development)
22

33
#### New Features
44

src/core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void nano_serialize_next(nano_buf *buf, const SEXP object) {
212212
buf->buf[0] = 0x7;
213213
buf->buf[1] = registered;
214214
buf->buf[2] = special_bit;
215-
buf->cur += registered ? 12 : 4;
215+
buf->cur += registered ? 16 : 8;
216216

217217
struct R_outpstream_st output_stream;
218218

@@ -235,7 +235,7 @@ void nano_serialize_next(nano_buf *buf, const SEXP object) {
235235

236236
if (registered && TAG(nano_refHook) != R_NilValue) {
237237
uint64_t cursor = (uint64_t) buf->cur;
238-
memcpy(buf->buf + 4, &cursor, sizeof(uint64_t));
238+
memcpy(buf->buf + 8, &cursor, sizeof(uint64_t));
239239
SEXP call, out;
240240

241241
if (registered == 1) {
@@ -329,7 +329,7 @@ SEXP nano_unserialize(unsigned char *buf, const size_t sz) {
329329
goto resume;
330330
case 0x7:
331331
if (registered) {
332-
offset = *(uint64_t *) (buf + 4);
332+
offset = *(uint64_t *) (buf + 8);
333333
if (offset) {
334334
SEXP raw, call;
335335
if (registered == 1) {
@@ -362,11 +362,11 @@ SEXP nano_unserialize(unsigned char *buf, const size_t sz) {
362362

363363
}
364364
}
365-
cur = 12;
365+
cur = 16;
366366
goto resume;
367367
}
368368
offset = 0;
369-
cur = 4;
369+
cur = 8;
370370
goto resume;
371371
}
372372
}

0 commit comments

Comments
 (0)