Skip to content

Commit

Permalink
Устранен вылет при запуске на Win7 и Win Server 2008.
Browse files Browse the repository at this point in the history
Fix #16, Close #19
  • Loading branch information
orefkov committed Sep 29, 2021
1 parent 4bded7f commit ce56f23
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/include/core_as/strexpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,13 @@ constexpr static auto operator & (const strexpr<A>& a, const K(&s)[N]) {
return strexpr<J>{J{ a.a, L { s } }};
}

template<typename K, size_t N>
static auto e_c(const K(&s)[N]) {
using J = expr_literal<K, static_cast<uint>(N - 1)>;
return strexpr<J>{J{ s }};
}

template<typename K, uint N, uint S = ' '>
struct expr_spaces {
using symb_type = K;
constexpr uint length() const noexcept { return N; }
constexpr symb_type* place(symb_type* p) const noexcept {
if constexpr (N != 0)
char_traits<K>::assign(p, N, static_cast<K>(S));
std::char_traits<K>::assign(p, N, static_cast<K>(S));
return p + N;
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/include/core_as/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define F_VERSION 1,0,1,0
#define P_VERSION "1.0.1.0"
#define F_VERSION 1,0,1,1
#define P_VERSION "1.0.1.1"
#define COPY_RIGHT "© Àëåêñàíäð Îðåôêîâ, 2021"
2 changes: 2 additions & 0 deletions src/inject/inject.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:threadSafeInit- /utf-8 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -170,6 +171,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:threadSafeInit- /utf-8 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
3 changes: 0 additions & 3 deletions src/starter/debugdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
#include "pch.h"

#ifdef _DEBUG
#include <Dbghelp.h>

typedef BOOL(WINAPI* MINIDUMPWRITEDUMP) (HANDLE,
Expand Down Expand Up @@ -54,5 +53,3 @@ void initLastDump() {
AddVectoredExceptionHandler(1, TopLevelFilter);
SetUnhandledExceptionFilter(TopLevelFilter);
}

#endif
6 changes: 4 additions & 2 deletions src/starter/starter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ void processStopInject() {
inject_unhook();
if (h64Write) {
char cmd = icUnhook;
WriteFile(h64Write, &cmd, 1, 0, 0);
DWORD w;
WriteFile(h64Write, &cmd, 1, &w, 0);
}
isInjected = false;
processBroadCast(lstringw<100>(+L"starter\v"_ss & (size_t)hMainWnd & L"\vinject=0"));
Expand All @@ -234,7 +235,8 @@ void processResumeInject() {
inject_hook();
if (h64Write) {
char cmd = icHook;
WriteFile(h64Write, &cmd, 1, 0, 0);
DWORD w;
WriteFile(h64Write, &cmd, 1, &w, 0);
}
isInjected = true;
processBroadCast(lstringw<100>(+L"starter\v"_ss & (size_t) hMainWnd & L"\vinject=1"));
Expand Down

0 comments on commit ce56f23

Please sign in to comment.