Skip to content

Commit 0e86854

Browse files
author
Requiem
committed
sync dev
2 parents cd46cf4 + e6f6884 commit 0e86854

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ sudo make install
112112
cmake -S . -B build/ -G "Visual Studio 16 2019"
113113
```
114114

115+
Optionally, you can create a debug build by appending `-DCMAKE_BUILD_TYPE=Debug` to the cmake arguments.
116+
115117
<br>
116118

117119

src/vmaware.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,7 @@ struct VM {
907907
constexpr std::size_t buffer_size = sizeof(i32) * buffer.size();
908908
std::array<char, 64> charbuffer{};
909909

910-
std::string brand = "";
911-
brand.reserve(48); // 3 leafs 16 each
910+
std::string brand(48, '\0'); // 3 leafs 16 each
912911

913912
constexpr std::array<u32, 3> ids = { { cpu::leaf::brand1, cpu::leaf::brand2, cpu::leaf::brand3 } };
914913
for (const u32& id : ids) {
@@ -11524,12 +11523,16 @@ struct VM {
1152411523
const std::string inside_vm = "Running inside";
1152511524
#endif
1152611525

11527-
auto make_conclusion = [&](std::string_view category) -> std::string {
11526+
#if (CPP >= 17)
11527+
auto make_conclusion = [&](const std::string_view category) -> std::string {
11528+
#else
11529+
auto make_conclusion = [&](const std::string &category) -> std::string {
11530+
#endif
1152811531
// this basically just fixes the grammatical syntax
1152911532
// by either having "a" or "an" before the VM brand
11530-
// name, like it would look weird if the conclusion
11533+
// name. Like it would look weird if the conclusion
1153111534
// message was "an VirtualBox" or "a Anubis", so this
11532-
// section fixes that issue.
11535+
// lambda fixes that issue.
1153311536
std::string article = "";
1153411537

1153511538
if (

0 commit comments

Comments
 (0)