Skip to content

Commit

Permalink
Replace sprintf call in tapping_term_report by get_u16_str
Browse files Browse the repository at this point in the history
  • Loading branch information
precondition committed Nov 25, 2021
1 parent bf37062 commit 945aacc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions quantum/process_keycode/process_dynamic_tapping_term.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>
#include "quantum.h"
#include "process_dynamic_tapping_term.h"

Expand All @@ -23,11 +22,12 @@
#endif

static void tapping_term_report(void) {
char display[8];

snprintf(display, sizeof(display), "%d", g_tapping_term);

send_string((const char *)display);
const char *tapping_term_str = get_u16_str(g_tapping_term, ' ');
// Skip padding spaces
while (*tapping_term_str == ' ') {
tapping_term_str++;
}
send_string(tapping_term_str);
}

bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record) {
Expand Down

0 comments on commit 945aacc

Please sign in to comment.