VincentWei / MiniGUI

A modern and mature cross-platform window system for embedded systems and smart IoT devices.
http://www.minigui.com
GNU General Public License v3.0
694 stars 157 forks source link

RegisterListenFD 有个逻辑有些不合理 #46

Closed steprun closed 4 years ago

steprun commented 4 years ago

if (ok && msg_queue->maxfd < fd) { msg_queue->maxfd = fd; return TRUE; }

应该改为下面更合理 if (ok) { if (msg_queue->maxfd < fd) msg_queue->maxfd = fd; return TRUE; }

VincentWei commented 4 years ago

Thanks for your report. I have changed the code to:

        if (ok) { 
            if (msg_queue->maxfd < fd) {
                msg_queue->maxfd = fd;
            }

            return TRUE;
        }