Browse Source

[SniffEmu] v1.1.1

Tomek Wójcik 4 weeks ago
parent
commit
8f1134622a

+ 5 - 0
SniffEmu/README.md

@@ -50,6 +50,11 @@ AmigaOS 3.1+, MC68020+
 
 ## Changelog
 
+Version 1.1.1 (27.02.2023)
+
+  * Added missing `CloseLibrary()` call to close _expansion.library_.
+    Reported by Tj de Wolff
+
 Version 1.1.0 (25.02.2023)
 
   * Added sound card detection.

+ 5 - 0
SniffEmu/SniffEmu/Readme

@@ -42,6 +42,11 @@ SniffEmu is licensed under the MIT License.
 Changelog
 ---------
 
+Version 1.1.1 (27.02.2023)
+
+  * Added missing CloseLibrary() call to close expansion.library.
+    Reported by Tj de Wolff
+
 Version 1.1.0 (25.02.2023)
 
   * Added sound card detection.

BIN
SniffEmu/SniffEmu/SniffEmu


+ 12 - 7
SniffEmu/SniffEmu/Source/SniffEmu.c

@@ -81,20 +81,25 @@ int help() {
 int find_board(int manufacturer, int product) {
     int result = RETURN_OK;
 
-    printf("SniffEmu: Looking for board: %d:%d... ", manufacturer, product);
-
     if (ExpansionBase = (struct ExpansionBase *)OpenLibrary(EXPANSIONNAME, 0L)) {
         struct ConfigDev* cd = NULL;
+        
+        printf("SniffEmu: Looking for board: %d:%d... ", manufacturer, product);
 
         while (cd = FindConfigDev(cd, manufacturer, product)) {
             result = RETURN_WARN;
         }
-    }
-
-    if (result == RETURN_WARN) {
-        printf("FOUND\n");
+        
+        CloseLibrary(ExpansionBase);
+        
+        if (result == RETURN_WARN) {
+            printf("FOUND\n");
+        } else {
+            printf("NOT FOUND\n");
+        }
     } else {
-        printf("NOT FOUND\n");
+        printf("SniffEmu: Could not open expansion.library!\n");
+        result = RETURN_FAIL;
     }
 
     return result;

+ 2 - 2
SniffEmu/SniffEmu/Source/SniffEmu.h

@@ -1,8 +1,8 @@
 #ifndef __SNIFFEMU_H__
 #define __SNIFFEMU_H__
 
-#define VERSION "1.1.0"
-#define DATE "25.02.2023"
+#define VERSION "1.1.1"
+#define DATE "27.02.2023"
 
 #define APP_VSTRING "$VER: SniffEmu " VERSION " (" DATE ")"
 

+ 6 - 1
SniffEmu/dist/SniffEmu.readme

@@ -2,7 +2,7 @@ Short:        Check if system is running in emulator
 Author:       Tomek Wójcik <contact@bthlabs.pl>
 Uploader:     Tomek Wójcik <contact@bthlabs.pl>
 Type:         util/sys
-Version:      1.1.0
+Version:      1.1.1
 Architecture: m68k-amigaos
 Requires:     AmigaOS 3.1+, MC68020+
 
@@ -50,6 +50,11 @@ SniffEmu is licensed under the MIT License.
 Changelog
 ---------
 
+Version 1.1.1 (27.02.2023)
+
+  * Added missing CloseLibrary() call to close expansion.library.
+    Reported by Tj de Wolff
+
 Version 1.1.0 (25.02.2023)
 
   * Added sound card detection.