Page 1 of 1

gE memset fix

PostPosted: Tue Jun 16, 2009 5:38 am
by skydereign
Turns out gameEditor's memset function is nonoperational, at least setting to NULL. I made this, a brute force way of clearing the array, the interface is the same as memset. To use it, put it in global code, and it should work just as memset should. This is set up for char arrays... But it is easily changed.
Code: Select all
void *
mymemset(void * s, int c, size_t n)
{
    char * t = s;
    int i;
    for(i=0;i<n;i++)
    {
        t[i]=c;
    }
    return(t);
}