Skip to content

Commit 6710ac1

Browse files
committed
fix FEC error
1 parent 8fa93ee commit 6710ac1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/3rd_party/fecpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ namespace fecpp
521521
return {};
522522

523523
std::map<size_t, std::vector<uint8_t>> missing_blocks;
524-
std::unique_ptr<uint8_t[]> m_dec = std::make_unique_for_overwrite<uint8_t[]>(K * K);
524+
std::unique_ptr<uint8_t[]> m_dec = std::make_unique<uint8_t[]>(K * K);
525525
std::unique_ptr<size_t[]> indexes = std::make_unique_for_overwrite<size_t[]>(K);
526-
std::unique_ptr<const uint8_t *[]> sharesv = std::make_unique<const uint8_t * []>(K);
526+
std::unique_ptr<const uint8_t *[]> sharesv = std::make_unique_for_overwrite<const uint8_t * []>(K);
527527

528528
std::map<size_t, const uint8_t*>::const_iterator shares_b_iter = shares.begin();
529529
std::map<size_t, const uint8_t*>::const_reverse_iterator shares_e_iter = shares.rbegin();

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
int main(int argc, char *argv[])
1717
{
1818
#ifdef __cpp_lib_format
19-
std::cout << std::format("{} version 20250406\n", app_name);
19+
std::cout << std::format("{} version {}\n", app_name, app_version);
2020
if (argc <= 1)
2121
{
2222
std::cout << std::format("Usage: {} config1.conf\n", app_name);
2323
std::cout << std::format(" {} config1.conf config2.conf...\n", (int)app_name.length(), app_name.data());
2424
return 0;
2525
}
2626
#else
27-
std::cout << app_name << " version 20250406\n";
27+
std::cout << app_name << " version " << app_version << "\n";
2828
if (argc <= 1)
2929
{
3030
std::cout << "Usage: " << app_name << " config1.conf\n";

src/shares/share_defines.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "../3rd_party/thread_pool.hpp"
2020

2121
constexpr std::string_view app_name = "udphop";
22+
constexpr std::string_view app_version = "20250415";
2223

2324
enum class running_mode { unknow, empty, server, client, relay, relay_ingress, relay_egress };
2425
enum class encryption_mode { unknow, empty, none, plain_xor, aes_gcm, aes_ocb, chacha20, xchacha20 };

0 commit comments

Comments
 (0)