]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
FIx NIC array overflow and increased size.
authorToni Wilen <twilen@winuae.net>
Wed, 4 Aug 2021 19:04:42 +0000 (22:04 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 4 Aug 2021 19:04:42 +0000 (22:04 +0300)
ethernet.cpp
include/sana2.h

index 7aa35d60b229c6157eec1afcecc012fcff05f923..843a0fb7283190d81c324df6e557cdf7fa20c1ff 100644 (file)
@@ -232,7 +232,8 @@ bool ethernet_enumerate (struct netdriverdata **nddp, int romtype)
 #ifdef WITH_UAENET_PCAP
        nd = uaenet_enumerate (NULL);
        if (nd) {
-               for (int i = 0; i < MAX_TOTAL_NET_DEVICES; i++) {
+               int last = MAX_TOTAL_NET_DEVICES - 1 - j;
+               for (int i = 0; i < last; i++) {
                        if (nd[i].active)
                                nddp[j++] = &nd[i];
                }
index 72df93058a3f86357f660b945f4110e4f92c126f..6c066679f490232260b4b0d5110917fe5945f209 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "uae/types.h"
 
-#define MAX_TOTAL_NET_DEVICES 10
+#define MAX_TOTAL_NET_DEVICES 30
 
 uaecptr netdev_startup(TrapContext*, uaecptr resaddr);
 void netdev_install(void);