Skip to content

Commit 4f18d71

Browse files
committed
i dont know what im doing anymore
1 parent f05776e commit 4f18d71

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/asar/platform/generic/thread-helpers-pthread.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ bool run_as_thread(functor&& callback) {
5656
return wrapper.result;
5757
}
5858

59+
#ifndef NO_USE_THREADS
5960
size_t check_stack_left() {
6061
pthread_attr_t attrs;
6162
void *stack_start;
@@ -68,5 +69,5 @@ size_t check_stack_left() {
6869
// using a random local as a rough estimate for current top-of-stack
6970
size_t stack_left = (char*)&stack_size - (char*)stack_start;
7071
return stack_left;
71-
if(stack_left < 32768) asar_throw_error(pass, error_type_fatal, error_id_recursion_limit);
7272
}
73+
#endif

src/asar/platform/windows/thread-helpers-win32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ bool run_as_thread(functor&& callback) {
8585
}
8686

8787
size_t check_stack_left() {
88-
size_t stack_low, stack_high;
88+
ULONG_PTR stack_low, stack_high;
8989
GetCurrentThreadStackLimits(&stack_low, &stack_high);
9090
size_t stack_left = (char*)&stack_low - (char*)stack_low;
9191
return stack_left;

0 commit comments

Comments
 (0)