gE memset fix

You must understand the Game Editor concepts, before post here.

gE memset fix

Postby skydereign » Tue Jun 16, 2009 5:38 am

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);
}
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron