mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Merge branch '3887_endianness'
* 3887_endianness: Ticket #3887: (handle_console_linux): fix endianness bug.
This commit is contained in:
commit
b8262f22e8
@ -241,7 +241,13 @@ handle_console_linux (console_action_t action)
|
||||
return;
|
||||
}
|
||||
/* Send command to the console handler */
|
||||
status = write (pipefd1[1], &action, 1);
|
||||
{
|
||||
/* Convert enum (i.e. int) to char to write the correct value
|
||||
* (the least byte) regardless of machine endianness. */
|
||||
char act = (char) action;
|
||||
|
||||
status = write (pipefd1[1], &act, 1);
|
||||
}
|
||||
if (action != CONSOLE_DONE)
|
||||
{
|
||||
/* Wait the console handler to do its job */
|
||||
|
Loading…
Reference in New Issue
Block a user