mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
src: simplify GetExponentString
PR-URL: https://github.com/nodejs/node/pull/42121 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
1 parent
80bfb9b21a
commit
f71fca769e
1 file changed
+1
-7
@@ -518,13 +518,7 @@ MaybeLocal<Value> GetExponentString(
|
||||
const BIOPointer& bio,
|
||||
const BIGNUM* e) {
|
||||
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(e));
|
||||
uint32_t lo = static_cast<uint32_t>(exponent_word);
|
||||
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
|
||||
if (hi == 0)
|
||||
BIO_printf(bio.get(), "0x%x", lo);
|
||||
else
|
||||
BIO_printf(bio.get(), "0x%x%08x", hi, lo);
|
||||
|
||||
BIO_printf(bio.get(), "0x%" PRIx64, exponent_word);
|
||||
return ToV8Value(env, bio);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user