Skip to content

Commit b95b503

Browse files
committed
Fix extension pointers in cnex
1 parent a041415 commit b95b503

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exec/cnex/extension.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ void cell_set_bytes(struct Ne_Cell *cell, const unsigned char *value, int size)
137137

138138
void *cell_get_pointer(const struct Ne_Cell *cell)
139139
{
140-
cell_ensureOther((Cell*)cell);
141-
return (void*)((Cell*)cell)->other;
140+
cell_ensureObject((Cell*)cell);
141+
return ((Cell*)((Cell*)cell)->object->ptr)->other;
142142
}
143143

144144
void cell_set_pointer(struct Ne_Cell *cell, void *p)
145145
{
146-
cell_ensureOther((Cell*)cell);
147-
((Cell*)cell)->other = p;
146+
cell_ensureObject((Cell*)cell);
147+
((Cell*)cell)->object->ptr = cell_createOtherCell(p);
148148
}
149149

150150
int cell_get_array_size(const struct Ne_Cell *cell)

0 commit comments

Comments
 (0)