summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_formcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_formcontrol.cpp')
-rw-r--r--core/fpdfdoc/cpdf_formcontrol.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp
index 2100d4ecee..a80b0294c1 100644
--- a/core/fpdfdoc/cpdf_formcontrol.cpp
+++ b/core/fpdfdoc/cpdf_formcontrol.cpp
@@ -149,11 +149,10 @@ bool CPDF_FormControl::IsDefaultChecked() const {
void CPDF_FormControl::CheckControl(bool bChecked) {
ASSERT(GetType() == CPDF_FormField::CheckBox ||
GetType() == CPDF_FormField::RadioButton);
- ByteString csOn = GetOnStateName();
ByteString csOldAS = m_pWidgetDict->GetStringFor("AS", "Off");
ByteString csAS = "Off";
if (bChecked)
- csAS = csOn;
+ csAS = GetOnStateName();
if (csOldAS == csAS)
return;
m_pWidgetDict->SetNewFor<CPDF_Name>("AS", csAS);