Skip to content

Commit

Permalink
特定サイズの画像にフィルタをかけた際、例外が発生する問題の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Ojii committed Jan 31, 2025
1 parent ef9605b commit eecfe30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dll_src/Bevel_And_Emboss_M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ int bevel_and_emboss(lua_State *L) {
if(size == 0)
return 0;

std::unique_ptr<Pixel_BGRA[]> bevel_buffer = std::make_unique_for_overwrite<Pixel_BGRA[]>(size);
// putpixeldata にてSIMD処理による範囲外アクセスが発生する場合があるため、 +8
std::unique_ptr<Pixel_BGRA[]> bevel_buffer = std::make_unique_for_overwrite<Pixel_BGRA[]>(size + 8);
memcpy(bevel_buffer.get(), utl_getpixeldata(L), sizeof(Pixel_BGRA) * size);

//辺は滑らかになるが頂点が丸くなるので一長一短
Expand Down

0 comments on commit eecfe30

Please # to comment.