mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 10:38:09 +08:00 
			
		
		
		
	Fix xterm parsing. unsigned vs signed char problem.
This commit is contained in:
		| @@ -17,7 +17,7 @@ class DrawKey : public Component { | |||||||
|     for (size_t i = std::max(0, (int)keys.size() - 10); i < keys.size(); ++i) { |     for (size_t i = std::max(0, (int)keys.size() - 10); i < keys.size(); ++i) { | ||||||
|       std::wstring code; |       std::wstring code; | ||||||
|       for(auto& it : keys[i].input()) |       for(auto& it : keys[i].input()) | ||||||
|         code += L" " + std::to_wstring((int)it); |         code += L" " + std::to_wstring((unsigned int)it); | ||||||
|  |  | ||||||
|       code = L"(" + code + L" ) -> " + keys[i].character() + L")"; |       code = L"(" + code + L" ) -> " + keys[i].character() + L")"; | ||||||
|       children.push_back(text(code)); |       children.push_back(text(code)); | ||||||
|   | |||||||
| @@ -128,7 +128,7 @@ Event Event::GetEvent(std::function<char()> getchar) { | |||||||
|       return ParseESC(getchar, input); |       return ParseESC(getchar, input); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   if (input[0] < 32)  // C0 |   if (input[0] >= 0 && input[0] < 32)  // C0 | ||||||
|     return Event::Special(input); |     return Event::Special(input); | ||||||
|  |  | ||||||
|   return ParseUTF8(getchar, input); |   return ParseUTF8(getchar, input); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ArthurSonzogni
					ArthurSonzogni