fixed makeh for older compilers

This commit is contained in:
Zeno Rogue 2019-09-13 18:30:05 +02:00
parent 6237bcbed6
commit 31fb9d4b8b
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <set>
#include <cstdlib>
using namespace std;
@ -41,7 +42,7 @@ void gen(string sf) {
while(getline(in, s)) {
lineid++;
while(s != "" && s[0] == ' ') s = s.substr(1);
while(s.back() == 10 || s.back() == 13) s = s.substr(0, s.size() - 1);
while(s != "" && (s[s.size()-1] == 10 || s[s.size()-1] == 13)) s = s.substr(0, s.size() - 1);
if(in_hdr) {
if(s == "#endif")
in_hdr--;