medfall

A super great game engine
Log | Files | Refs

commit 6d1f2ff2ed09a284c42511f4b5e4dbbe8d72c92e
parent 4e5c3016932db3364fd09b10f2072b63947c7646
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue, 28 May 2019 16:41:14 +0300

Oops

Diffstat:
Marray.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/array.h b/array.h @@ -471,8 +471,8 @@ static T bilerp01( const array2d< T > arr, float x, float y ) { inline void format( FormatBuffer * fb, array< const char > arr, const FormatOpts & opts ) { if( fb->len < fb->capacity - 1 ) { - size_t len = min2( span.n, fb->capacity - fb->len - 1 ); - memcpy( fb->buf + fb->len, span.ptr, len ); + size_t len = min( arr.n, fb->capacity - fb->len - 1 ); + memcpy( fb->buf + fb->len, arr.ptr(), len ); fb->buf[ fb->len + len ] = '\0'; } fb->len += arr.n;