From 9d4a6e67883f353161f054875cf4e4d80937dea7 Mon Sep 17 00:00:00 2001 From: Zachary Weiss Date: Sun, 21 Apr 2024 21:44:06 -0400 Subject: [PATCH] Fix MNTM-DEV git hash formatting (#104) * Fix max length of git hash * Fix editor auto-reformat that causes it to fail lint * Found it... * Revert "Found it..." This reverts commit c7cb7907169f32d5050320f8f0803647020fd6c3. --------- Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com> --- applications/main/momentum_app/momentum_app.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/main/momentum_app/momentum_app.c b/applications/main/momentum_app/momentum_app.c index d8a118473..9e296671a 100644 --- a/applications/main/momentum_app/momentum_app.c +++ b/applications/main/momentum_app/momentum_app.c @@ -328,7 +328,8 @@ MomentumApp* momentum_app_alloc() { if(furi_string_start_with(app->version_tag, "mntm-dev")) { furi_string_set(app->version_tag, "MNTM-DEV "); const char* sha = version_get_githash(NULL); - for(size_t i = 0; i < strlen(sha); ++i) { + const uint8_t sha_len = strlen(sha) <= 7 ? strlen(sha) : 7; + for(size_t i = 0; i < sha_len; ++i) { furi_string_push_back(app->version_tag, toupper(sha[i])); } } else {