# HG changeset patch # User thib # Date 1239993486 0 # Node ID 35ce1a30f3f90e68ddc11459ab8f3c46f5dae71e # Parent 6581f7eccd26430fc1630add347fcc0df259b184 * Added va_end where there is a va_start * Used NULL instead of 0 (so it works on 64b) diff --git a/font/font_layout.cc b/font/font_layout.cc --- a/font/font_layout.cc +++ b/font/font_layout.cc @@ -131,6 +131,7 @@ TextGlyphStreamHelper::Add(int& x, TextG gl.g = g = it->impl.Color.g; gl.b = b = it->impl.Color.b; } else if (it->type == TextElem::size) { + delete face; face = font->FaceLoad(it->impl.Size.scale); } else if (it->type == TextElem::escape) { x = gl.x; diff --git a/music2/koedec.cc b/music2/koedec.cc --- a/music2/koedec.cc +++ b/music2/koedec.cc @@ -114,13 +114,17 @@ AvgKoeInfo AvgKoeCache::Find(int file_nu //FIXME: OMG that's ugly, improve it as soon as you can! DIRFILE* koedir = (DIRFILE*) file_searcher.MakeARCFILE((FILESEARCH::ARCTYPE)0, "koe"); sprintf(fname, "%04d", file_number); - koedir = new DIRFILE(koedir->SearchFile(fname)); + char* dirname = koedir->SearchFile(fname); + delete koedir; + koedir = new DIRFILE(dirname); + delete[] dirname; sprintf(fname, "z%04d%05d.ogg", file_number, index); arcinfo = koedir->Find(fname, ".ogg"); delete koedir; if (arcinfo == 0) return info; FILE* stream = arcinfo->OpenFile(&info.length); + delete arcinfo; info.type = koe_ogg; info.stream = stream; return info; diff --git a/scn2k/scn2k_grp.cc b/scn2k/scn2k_grp.cc --- a/scn2k/scn2k_grp.cc +++ b/scn2k/scn2k_grp.cc @@ -510,6 +510,7 @@ TextStream GrpObj::ParseMoji(const char* str, int def_r ,int def_g, int def_b, int def_size) { // 制御シーケンス付き文字列をparse } } ts.Add(str); + delete[] copy_str; return ts; } void GrpObj::UpdateMoji(void) { // 文字の大きさ、色などを変更 @@ -845,6 +846,7 @@ GrpImpl::~GrpImpl() { delete screen; delete screen_front; parent.Root().DeleteSurface(surface); + parent.Root().DeleteSurface(surface_update); int i; for (i=0; i= MAXVARS) return ; HashStr str(name); - int vars[MAXVARS]; va_list va; int i; + int vars[deal]; va_list va; int i; va_start(va, deal); for (i=0; iorig.Set(str, deal, vars); dirty_flag = 1; change_flag = 1; return; @@ -609,9 +624,10 @@ void AyuSysConfig::SetOrigParaStr(const void AyuSysConfig::SetOrigParam(const char* name, int deal, ...) { if (deal >= MAXVARS) return; HashStr str(name); - int vars[MAXVARS]; va_list va; int i; + int vars[deal]; va_list va; int i; va_start(va, deal); for(i=0; iorig.SetOrig(str, deal, vars); change_flag = 1; }