Compare commits

..

2 commits

Author SHA1 Message Date
f05103d871 Fix to Makefile 2024-04-16 20:38:34 +09:00
c99a2dceb0 Fix to Korean number representation 2024-04-16 20:37:15 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ OBJECTS = $(addprefix ${OBJDIR}/,$(patsubst %.cpp,%.cpp.o,${SOURCES}))
all: KoreanNumbers all: KoreanNumbers
KoreanNumbers: ${OBJECTS} KoreanNumbers: ${OBJECTS}
$(CXX) $(CXXFLAGS) -o KoreanNumbers $^ $(CXX) $(CXXFLAGS) -fPIE -pie -o KoreanNumbers $^
${OBJDIR}/%.cpp.o: %.cpp ${OBJDIR}/%.cpp.o: %.cpp
@mkdir -p $(dir $@) @mkdir -p $(dir $@)

View file

@ -143,7 +143,7 @@ std::u8string value_to_korean(unsigned long long value) {
} }
if(temp = (value / 10000) % 10; temp > 0) { if(temp = (value / 10000) % 10; temp > 0) {
if(!s.empty()) { s.push_back(' '); } if(!s.empty()) { s.push_back(' '); }
if(temp != 1) { s.append(digit_to_kword(temp)); } if(temp > 0) { s.append(digit_to_kword(temp)); }
s.append(man); s.append(man);
} else if (requires_man) { } else if (requires_man) {
s.push_back(' '); s.push_back(' ');