for(i = 0; i < strlen(table->contents[row][col]); i++) {
table->table_lines[row][pos++] = table->contents[row][col][i];
}
- for(;i < table->maxwidth[col]; i++) {
+ if(col < table->width-1) {
+ for(;i < table->maxwidth[col]; i++) {
+ table->table_lines[row][pos++] = ' ';
+ }
table->table_lines[row][pos++] = ' ';
- }
+ } else
+ table->table_lines[row][pos++] = '\0';
+
if(table->col_flags[col] & TABLE_FLAG_COL_BOLD)
table->table_lines[row][pos++] = '\002';
- if(col < table->width-1)
- table->table_lines[row][pos++] = ' ';
- else
- table->table_lines[row][pos++] = '\0';
}
}
return table->table_lines;
item[citem++] = build_language_string(user, NULL, (tmp == 1 ? "TIME_DAY" : "TIME_DAYS"), tmp);
seconds -= tmp * 86400;
}
- if(citem != items && seconds >= 3600) { //60*60 = 86400
+ if(citem != items && seconds >= 3600) { //60*60 = 3600
tmp = seconds / 3600;
item[citem++] = build_language_string(user, NULL, (tmp == 1 ? "TIME_HOUR" : "TIME_HOURS"), tmp);
seconds -= tmp * 3600;