diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-10 11:28:59 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-10 11:28:59 +0000 |
| commit | bb15df3f3428df7cd2a4482adebcdaa6fc2f516e (patch) | |
| tree | 61993b5576bebeff7cf9dbcecc5fabdf592abfcc /src/base/director.c | |
| parent | 0eda3185ba30d433029c9a7e725529a801c93d80 (diff) | |
- precisteny kod sietoveho multiplayera
- moduly si mozu mosielat spravy cez sietovy protokol
- opravy chyb v moduloch
- oprava chyby, v textovych poliach sa zobrazuju znaky, ktore ste nestalcili
- director_t* loadDirector(char *s) vracia NULL ak adresar neexistuje ( predtym sa proces zrutil )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@126 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base/director.c')
| -rwxr-xr-x | src/base/director.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/director.c b/src/base/director.c index 0cece6b..1877a8b 100755 --- a/src/base/director.c +++ b/src/base/director.c @@ -44,6 +44,14 @@ director_t* loadDirector(char *s) dir = opendir(new->path); + if( dir == NULL ) + { + free(new->path); + free(new); + + return NULL; + } + while( ( item = readdir(dir) ) != NULL ) addList(new->list, strdup(item->d_name) ); |