X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fengine%2Fe_msg.pas;h=6a6ca61fe14037c63fc488a3b202b1a7275724b5;hb=7ddf228d373859083726fdead73c4d84c8f05716;hp=bb7347740bd950401a0bfc4d49626b41c6884069;hpb=47930ac73c02e76e1d4ad3a577e4015f98556eb0;p=d2df-sdl.git diff --git a/src/engine/e_msg.pas b/src/engine/e_msg.pas index bb73477..6a6ca61 100644 --- a/src/engine/e_msg.pas +++ b/src/engine/e_msg.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -150,7 +149,7 @@ begin begin if OwnMemory then begin - NewSize := MaxSize + ((N + AllocStep) div AllocStep) * AllocStep; // round up + NewSize := MaxSize + ((N + AllocStep - 1) div AllocStep) * AllocStep; // round up if ReAllocMem(Data, NewSize) = nil then raise Exception.Create('TMsg.WriteData: out of memory on realloc'); MaxSize := NewSize;