Skip to content
Permalink
Browse files

return an error code if InternetQueryDataAvailable fails instead of j…

…ust breaking out of for loop
  • Loading branch information...
UnknownShadow200 committed Aug 8, 2019
1 parent 188c052 commit b1e95d9cd706d523a92e1cd1621b2533f4110708
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/Http.c
  2. +1 −1 src/Menus.c
@@ -574,7 +574,7 @@ static ReturnCode Http_DownloadData(struct HttpRequest* req, HINTERNET handle) {
Http_BufferInit(req);

for (;;) {
if (!InternetQueryDataAvailable(handle, &avail, 0, 0)) break;
if (!InternetQueryDataAvailable(handle, &avail, 0, 0)) return GetLastError();
if (!avail) break;
Http_BufferEnsure(req, avail);

@@ -1714,7 +1714,7 @@ static struct ScreenVTABLE KeyBindingsScreen_VTABLE = {
Menu_OnResize, Menu_ContextLost, NULL,
};
static struct KeyBindingsScreen* KeyBindingsScreen_Make(int bindsCount, uint8_t* binds, const char** descs, Event_Void_Callback contextRecreated) {
/* NOTE: 12 is the most controls on one screen (OtherKeyBindingsScreen_MakeInstance) */
/* NOTE: 12 is the most buttons on one screen (OtherKeyBindingsScreen_MakeInstance) */
static struct ButtonWidget buttons[12];
static struct Widget* widgets[12 + 4];
struct KeyBindingsScreen* s = &KeyBindingsScreen_Instance;

0 comments on commit b1e95d9

Please sign in to comment.
You can’t perform that action at this time.