mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Fix bugs found through gcc's warnings.
This commit is contained in:
parent
bc684222fc
commit
78fee72c50
2 changed files with 4 additions and 2 deletions
|
@ -578,7 +578,7 @@ void Key_Console (int key)
|
|||
// If the last two lines are identical, skip storing this line in history
|
||||
// by not incrementing edit_line
|
||||
if (strcmp(workline, key_lines[(edit_line-1)&31]))
|
||||
edit_line = (edit_line + 1) & 31;
|
||||
edit_line = (edit_line + 1) & (CMDLINES - 1);
|
||||
|
||||
history_line = edit_line;
|
||||
key_lines[edit_line][0] = ']';
|
||||
|
@ -779,6 +779,8 @@ void Char_Console (int key)
|
|||
workline[MAXCMDLINE - 2] = 0;
|
||||
workline += key_linepos;
|
||||
len = strlen(workline) + 1;
|
||||
if (len > MAXCMDLINE-2)
|
||||
len = MAXCMDLINE-2;
|
||||
memmove (workline + 1, workline, len);
|
||||
*workline = key;
|
||||
}
|
||||
|
|
|
@ -556,7 +556,7 @@ int WINS_GetSocketAddr (sys_socket_t socketid, struct qsockaddr *addr)
|
|||
{
|
||||
static const in_addr6_t in6addr_any;// = IN6ADDR_ANY_INIT;
|
||||
if (!memcmp(&((struct sockaddr_in6 *)addr)->sin6_addr, &in6addr_any, sizeof(in_addr6_t)))
|
||||
memcpy(&((struct sockaddr_in6 *)addr)->sin6_addr, &myAddrv6, sizeof(struct sockaddr_in6));
|
||||
memcpy(&((struct sockaddr_in6 *)addr)->sin6_addr, &myAddrv6, sizeof(in_addr6_t));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue