Skip to content

Commit 7d06234

Browse files
committed
comments
1 parent 5a7685d commit 7d06234

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/options.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static _Atomic(size_t) warning_count; // = 0; // when >= max_warning_count stop
262262
// this may crash as the access may call _tlv_bootstrap that tries to
263263
// (recursively) invoke malloc again to allocate space for the thread local
264264
// variables on demand. This is why we use a _mi_preloading test on such
265-
// platforms. However, code gen may move the initial thread local address
265+
// platforms. However, C code generator may move the initial thread local address
266266
// load before the `if` and we therefore split it out in a separate funcion.
267267
static mi_decl_thread bool recurse = false;
268268

@@ -551,7 +551,8 @@ static void mi_option_init(mi_option_desc_t* desc) {
551551
else if (*end == 'M') { value *= MI_KiB; end++; }
552552
else if (*end == 'G') { value *= MI_MiB; end++; }
553553
else { value = (value + MI_KiB - 1) / MI_KiB; }
554-
if (*end == 'B') { end++; }
554+
if (end[0] == 'I' && end[1] == 'B') { end += 2; }
555+
else if (*end == 'B') { end++; }
555556
}
556557
if (*end == 0) {
557558
desc->value = value;

0 commit comments

Comments
 (0)