aboutsummaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2013-07-15 16:23:03 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2013-07-15 16:23:03 (GMT)
commita1120b662b4653e34ed663e21d7bb06cbba49499 (patch)
treebca0a71c91e8fb604fc03c96af8d98beb96a597b /cmd.c
parentf9635fea9f805d6f9930e47a4a1c8c5592849f3a (diff)
parent2676fae2cf3a00368f311d52f3941b62005aee72 (diff)
downloadpowwow-a1120b662b4653e34ed663e21d7bb06cbba49499.zip
powwow-a1120b662b4653e34ed663e21d7bb06cbba49499.tar.gz
powwow-a1120b662b4653e34ed663e21d7bb06cbba49499.tar.bz2
pull from kalev
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd.c b/cmd.c
index edd6d00..551a069 100644
--- a/cmd.c
+++ b/cmd.c
@@ -339,7 +339,7 @@ static void cmd_module __P1 (char *,arg) {
/* I changed it to work this way so that you can have libs in multiple places and
* also eventually to allow it to use .dll instead of .so under the cygwin environment */
for( pindex = 0; pindex < 5; pindex++ ) {
- bzero( libname, 1024 );
+ memset( libname, 0, sizeof libname );
/* don't look for name without .so, it breaks if you have a file
* with the same name in the current dir and making it .so for sure
@@ -574,9 +574,11 @@ static void cmd_shell __P1 (char *,arg)
}
} else {
tty_quit();
-
- system(arg);
-
+
+ if (system(arg) == -1) {
+ perror("system()");
+ }
+
tty_start();
tty_gotoxy(col0 = 0, line0 = lines -1);
tty_puts(tty_clreoln);