Skip to content

Commit

Permalink
Remove segfault fix so our tooling finds it
Browse files Browse the repository at this point in the history
  • Loading branch information
br-lewis committed Aug 28, 2023
1 parent d4ec750 commit e5640aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ ConsumeIntegralArray(JNIEnv &env, jobject self, jint max_length) {
reinterpret_cast<const uint8_t *>(env.GetLongField(self, gDataPtrField));
jint remainingBytes = env.GetIntField(self, gRemainingBytesField);

jint max_num_bytes = std::max(
std::min(static_cast<jint>(sizeof(T)) * max_length, remainingBytes), 0);
jint max_num_bytes =
std::min(static_cast<jint>(sizeof(T)) * max_length, remainingBytes);
jsize actual_length = max_num_bytes / sizeof(T);
jint actual_num_bytes = sizeof(T) * actual_length;
auto array = (env.*(JniArrayType<T>::kNewArrayFunc))(actual_length);
Expand Down

0 comments on commit e5640aa

Please sign in to comment.