diff --git a/main.c b/main.c index cfac8e9..ed0bc46 100644 --- a/main.c +++ b/main.c @@ -265,4 +265,4 @@ int main(int argc, char *argv[]) { repl(); return 0; -} \ No newline at end of file +} diff --git a/r.h b/r.h index 2956faf..730ebd3 100644 --- a/r.h +++ b/r.h @@ -73,7 +73,7 @@ void set_prompt_model(const char *model) { const char *get_prompt_model() { if (_model == NULL && getenv("R_MODEL") != NULL) { - _model = getenv("R_MODEL"); + _model = strdup(getenv("R_MODEL")); } if (_model) { return _model; diff --git a/rpylib.so b/rpylib.so index 6b49d71..99c3529 100755 Binary files a/rpylib.so and b/rpylib.so differ