Skip to content

Commit 798cdee

Browse files
authored
Add files via upload
1 parent 6c5e13a commit 798cdee

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

zsfx.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ c:\mingw32\bin\g++ -m32 -O3 zsfx.cpp libzpaq.cpp -o zsfx32 -pthread -static
1818
1919
*/
2020

21-
#define ZSFX_VERSION "52.2"
21+
#define ZSFX_VERSION "52.3"
2222
#define _FILE_OFFSET_BITS 64 // In Linux make sizeof(off_t) == 8
2323
#define UNICODE // For Windows
2424
#include "libzpaq.h"
@@ -95,7 +95,8 @@ inline char * migliaia(uint64_t n)
9595
// Handle errors in libzpaq and elsewhere
9696
void libzpaq::error(const char* msg) {
9797
if (strstr(msg, "ut of memory")) throw std::bad_alloc();
98-
throw std::runtime_error(msg);
98+
printf("%s\n",msg);
99+
exit(0);
99100
}
100101
using libzpaq::error;
101102

@@ -318,8 +319,8 @@ const bool ads=strstr(filename, ":$DATA")!=0; // alternate data stream?
318319
// Print file open error and throw exception
319320
void ioerr(const char* msg) {
320321
printerr(msg);
321-
throw std::runtime_error(msg);
322-
}
322+
exit(0);
323+
}
323324

324325
// Create directories as needed. For example if path="/tmp/foo/bar"
325326
// then create directories /, /tmp, and /tmp/foo unless they exist.
@@ -2158,11 +2159,13 @@ string Jidac::findcommand(int64_t& o_offset)
21582159
string comando="";
21592160
readSize = fread(buffer, 1, blockSize, inFile);
21602161

2161-
if (readSize==blockSize)
2162-
{
2163-
printf("2290: SFX module seems huge!\n");
2164-
exit(0);
2165-
}
2162+
bool flagbuilder=(myname=="zsfx.exe")||(myname=="zsfx32.exe");
2163+
if (flagbuilder)
2164+
if (readSize==blockSize)
2165+
{
2166+
printf("2290: SFX module seems huge!\n");
2167+
exit(0);
2168+
}
21662169

21672170
if (readSize<=0)
21682171
{

0 commit comments

Comments
 (0)