Skip to content

Commit

Permalink
fixed file-io with qt, check key 'y' and 'Y'.
Browse files Browse the repository at this point in the history
Comming from CelestiaGlWidget::keyPressEvent() case VK_Y:
  • Loading branch information
GottfriedSp committed Jul 4, 2018
1 parent 330974a commit dcaa0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/celestia/celx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ bool LuaState::charEntered(const char* c_p)
if (ioMode == Asking && getTime() > timeout)
{
int stackTop = lua_gettop(costate);
if (strcmp(c_p, "y") == 0)
if(strcmp(c_p, "y") == 0 || strcmp(c_p, "Y") == 0)
{
#if LUA_VER >= 0x050100
openLuaLibrary(costate, LUA_LOADLIBNAME, luaopen_package);
Expand Down

1 comment on commit dcaa0a7

@375gnu
Copy link
Member

@375gnu 375gnu commented on dcaa0a7 Jul 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better if (c_p[0] == 'y' || c_p[0] == 'Y')

And please don't delete whitespaces between if and (.

Please sign in to comment.