mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #3321
3321: Mod by zero r=def- a=Jupeyy <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
6e5d0cce6f
|
@ -32,7 +32,10 @@ void CRenderTools::RenderEvalEnvelope(CEnvPoint *pPoints, int NumPoints, int Cha
|
|||
}
|
||||
|
||||
int64 MaxPointTime = (int64)pPoints[NumPoints - 1].m_Time * 1000ll;
|
||||
TimeMicros = TimeMicros % MaxPointTime;
|
||||
if(MaxPointTime > 0) // TODO: remove this check when implementing a IO check for maps(in this case broken envelopes)
|
||||
TimeMicros = TimeMicros % MaxPointTime;
|
||||
else
|
||||
TimeMicros = 0;
|
||||
|
||||
int TimeMillis = (int)(TimeMicros / 1000ll);
|
||||
for(int i = 0; i < NumPoints - 1; i++)
|
||||
|
|
Loading…
Reference in a new issue