diff --git a/src/builtin_printf.cpp b/src/builtin_printf.cpp
index 8595120d5..24cf9a9e1 100644
--- a/src/builtin_printf.cpp
+++ b/src/builtin_printf.cpp
@@ -444,6 +444,7 @@ void builtin_printf_state_t::print_direc(const wchar_t *start, size_t length, wc
         case L'X':
         case L'd':
         case L'i':
+        case L'o':
         case L'u': {
             fmt.append(L"ll");
             break;
