mirror of
https://gitlab.com/niansa/pilang2.git
synced 2025-03-06 20:49:22 +01:00
Fixed SIGSEGV
This commit is contained in:
parent
6be4891dc8
commit
06cdb03992
1 changed files with 13 additions and 13 deletions
26
main.cpp
26
main.cpp
|
@ -459,19 +459,19 @@ std::string run_command(std::string command, std::vector<std::string> args) {
|
||||||
// Interpreter initialiser
|
// Interpreter initialiser
|
||||||
void init_interpreter(int argc, char *argv[]) {
|
void init_interpreter(int argc, char *argv[]) {
|
||||||
// Load modules from modules directory
|
// Load modules from modules directory
|
||||||
struct dirent *dp;
|
//struct dirent *dp;
|
||||||
DIR *dfd;
|
//DIR *dfd;
|
||||||
char filename_qfd[264];
|
//char filename_qfd[264];
|
||||||
char moduledir [] = "modules";
|
//char moduledir [] = "modules";
|
||||||
dfd = opendir(moduledir);
|
//dfd = opendir(moduledir);
|
||||||
while ((dp = readdir(dfd)) != NULL) {
|
//while ((dp = readdir(dfd)) != NULL) {
|
||||||
sprintf(filename_qfd , "%s/%s",moduledir,dp->d_name);
|
// sprintf(filename_qfd , "%s/%s",moduledir,dp->d_name);
|
||||||
// Skip . and ..
|
// // Skip . and ..
|
||||||
if (strcmp(dp->d_name,"..") or strcmp(dp->d_name,"."))
|
// if (strcmp(dp->d_name,"..") or strcmp(dp->d_name,"."))
|
||||||
continue;
|
// continue;
|
||||||
// Load file
|
// // Load file
|
||||||
std::cout << "Module loading not yet implemented for: " << filename_qfd << std::endl;
|
// std::cout << "Module loading not yet implemented for: " << filename_qfd << std::endl;
|
||||||
}
|
//}
|
||||||
// Generate list of arguments
|
// Generate list of arguments
|
||||||
for (int elemnum = 0; elemnum < argc; elemnum++) {
|
for (int elemnum = 0; elemnum < argc; elemnum++) {
|
||||||
cmdargs.push_back(std::string(argv[elemnum]));
|
cmdargs.push_back(std::string(argv[elemnum]));
|
||||||
|
|
Loading…
Add table
Reference in a new issue