Big gcd wrong ans

what am i lacking in this code

#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll reduceB(ll a, string b)
{
ll mod = 0;
for (unsigned int i=0; i<b.length(); i++)
mod = (mod*10 + b[i] - ‘0’)%a;

return mod; 

}
ll gcd(ll a, ll b)
{
if (!a)
return b;
return gcd(b%a,a);
}
int main()
{
string a,b;
cin>>a>>b;
ll a1,b1;
a1=reduceB(10,a);
b1=reduceB(10,b);
cout<<gcd(a1,b1)<<endl;
return 0;
}