Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 54de96e

Browse files
committed
added the ability to printf %i
1 parent 9225fb3 commit 54de96e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

py/mpprint.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2+
/*
3+
* Copyright (c) 2020, Pycom Limited.
4+
*
5+
* This software is licensed under the GNU GPL version 3 or any
6+
* later version, with permitted additional terms. For more information
7+
* see the Pycom Licence v1.0 document supplied with this file, or
8+
* available at https://www.pycom.io/opensource/licensing
9+
*/
110
/*
211
* This file is part of the MicroPython project, http://micropython.org/
312
*
@@ -503,7 +512,8 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
503512
chrs += mp_print_strn(print, str, prec, flags, fill, width);
504513
break;
505514
}
506-
case 'd': {
515+
case 'd':
516+
case 'i': {
507517
mp_int_t val;
508518
if (long_arg) {
509519
val = va_arg(args, long int);

0 commit comments

Comments
 (0)