1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-01 08:03:02 +00:00

Add git commit hash to build to get version.

This commit is contained in:
Calvin Rose
2018-10-31 16:21:21 -04:00
parent 5625023925
commit 853a839f6c
3 changed files with 6 additions and 2 deletions

View File

@@ -29,7 +29,9 @@ extern "C" {
/***** START SECTION CONFIG *****/
#ifndef JANET_VERSION
#define JANET_VERSION "0.0.0 alpha"
#endif
/*
* Detect OS and endianess.

View File

@@ -249,7 +249,7 @@ static void historymove(int delta) {
historyi = history_count - 1;
return;
}
strncpy(buf, history[historyi], JANET_LINE_MAX);
strncpy(buf, history[historyi], JANET_LINE_MAX - 1);
pos = len = strlen(buf);
buf[len] = '\0';