mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +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;
|
return;
|
||||||
}
|
}
|
||||||
/* Send command to the console handler */
|
/* 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)
|
if (action != CONSOLE_DONE)
|
||||||
{
|
{
|
||||||
/* Wait the console handler to do its job */
|
/* Wait the console handler to do its job */
|
||||||
|
Loading…
Reference in New Issue
Block a user