42_Scale

a small software to create and edit 42 (.yaml) scale files easily
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/42_Scale

commit 351a3eb2c5e25a8926be426be3af057b7f323550
parent 81c7da1f18bd10249c6957c756259287be36771f
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Mon,  2 May 2016 14:36:03 +0200

Fix(Save): Fix skills name

Diffstat:
Msrcs/save.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/srcs/save.c b/srcs/save.c @@ -45,6 +45,11 @@ void print_sections(scale *s, FILE *fd) { scale_sections *it; scale_questions *qt; scale_skills *sk; + const char *skills[] = {"Adaptation & creativity", "Algorithms & AI", "Company experience", "DB & Data", + "Functionnal programming", "Graphics", "Group & interpersonal", "Imperative programming", + "Network & system administration", "Object-oriented programming", + "Organization", "Parallel computing", "Rigor", "Security", "Technology integration", "Unix", "Web"}; + for (it = s->sections; it; it = it->next) { fprintf(fd, "# BEGINNING OF SECTION %s #\n", it->name.buf); @@ -79,7 +84,7 @@ void print_sections(scale *s, FILE *fd) { for (sk = qt->skills; sk; sk = sk->next) { write_i(fd, "- percentage", sk->percent.val); tab = 6; - write_s(fd, "name", sk->name.buf, 0); + write_s(fd, "name", (char *)skills[sk->name.val], 0); tab = 4; } }