mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add unpack function documentation
This commit is contained in:
parent
ee26b2a2b9
commit
72394181c7
3 changed files with 15 additions and 13 deletions
|
|
@ -134,8 +134,6 @@ static int l_unpack(lua::State* L) {
|
|||
ByteReader reader(bytes);
|
||||
bool bigEndian = false;
|
||||
|
||||
int index = 1;
|
||||
lua::createtable(L, count, 0);
|
||||
for (size_t i = 0; format[i]; i++) {
|
||||
switch (format[i]) {
|
||||
case 'b':
|
||||
|
|
@ -185,9 +183,8 @@ static int l_unpack(lua::State* L) {
|
|||
default:
|
||||
continue;
|
||||
}
|
||||
lua::rawseti(L, index++);
|
||||
}
|
||||
return 1;
|
||||
return count;
|
||||
}
|
||||
|
||||
static int l_pack(lua::State* L) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue