diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp
index a4a08daf274e1e5831fb292f98fef0d04ccb1d8a..5a3689cee60b3f58de883c01f048bab91b116362 100644
--- a/indra/newview/llautoreplace.cpp
+++ b/indra/newview/llautoreplace.cpp
@@ -84,7 +84,7 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos)
 					if (atSpace)
 					{
 						// replace the last word in the input
-						LLWString strNew = utf8str_to_wstring(replWord);
+						LLWString strNew = utf8str_to_wstring(replacementWord);
 						LLWString strOld = utf8str_to_wstring(lastWord);
 						int size_change = strNew.size() - strOld.size();
 
@@ -95,7 +95,7 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos)
 					else
 					{
 						// @TODO display replacement as tooltip?
-						LL_DEBUGS("AutoReplace")<<"tooltip: '"<<lastWord<<"' -> '"<<replWord<<"'"<<LL_ENDL;
+						LL_DEBUGS("AutoReplace")<<"tooltip: '"<<lastWord<<"' -> '"<<replacementWord<<"'"<<LL_ENDL;
 					}
 				}
 			}