grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/3] crypto: switch nonstandard escape sequence to its hex value


From: Pete Batard
Subject: [PATCH 2/3] crypto: switch nonstandard escape sequence to its hex value
Date: Thu, 3 Aug 2017 17:11:15 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Regards,

/Pete
From 3660346530b5cb39c81e71dbfb488c8315aa8b78 Mon Sep 17 00:00:00 2001
From: Pete Batard <address@hidden>
Date: Thu, 3 Aug 2017 16:16:43 +0100
Subject: [PATCH 2/3] crypto: switch nonstandard escape sequence to its hex
 value

* '\e' is not in the C standard and produces an error with some compilers.
---
 grub-core/lib/crypto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
index 683a8aa..620d439 100644
--- a/grub-core/lib/crypto.c
+++ b/grub-core/lib/crypto.c
@@ -462,7 +462,7 @@ grub_password_get (char buf[], unsigned buf_size)
       if (key == '\n' || key == '\r')
        break;
 
-      if (key == '\e')
+      if (key == 0x1B)
        {
          cur_len = 0;
          break;
@@ -487,7 +487,7 @@ grub_password_get (char buf[], unsigned buf_size)
   grub_xputs ("\n");
   grub_refresh ();
 
-  return (key != '\e');
+  return (key != 0x1B);
 }
 #endif
 
-- 
2.9.3.windows.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]