From 75bb79aac84c29ad4c9c30896e36200807435e3b Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Wed, 13 Dec 2023 23:07:34 -0500
Subject: Fixed orange addition

---
 generator/generator.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'generator')

diff --git a/generator/generator.cpp b/generator/generator.cpp
index cd13051..435a63b 100644
--- a/generator/generator.cpp
+++ b/generator/generator.cpp
@@ -864,10 +864,16 @@ void generator::run() {
                             wanderlust_.size());
 
     for (const auto& [cipher, form_id] : wanderlust_) {
+      if (cipher < 100) {
+        continue;
+      }
       for (const auto& [cipher2, form_id2] : wanderlust_) {
         if (cipher2 >= cipher) {
           break;
         }
+        if (cipher2 < 100) {
+          continue;
+        }
         if (wanderlust_.count(cipher - cipher2)) {
           orange_addition.push_back(fmt::format(
               "[{},{},{}]", form_id2, wanderlust_[cipher - cipher2], form_id));
@@ -1044,6 +1050,7 @@ size_t generator::LookupOrCreateForm(const std::string& word) {
         })) {
       ciphered = 0;
       std::string to_cipher = word;
+      std::reverse(to_cipher.begin(), to_cipher.end());
       while (!to_cipher.empty()) {
         *ciphered *= 10;
         switch (to_cipher.back()) {
-- 
cgit 1.4.1