Fixed geo

This commit is contained in:
Vysheng 2014-10-07 14:02:19 +04:00
parent 62d3c07f34
commit a8a5de7489
2 changed files with 2 additions and 2 deletions

View File

@ -2304,7 +2304,7 @@ void print_media (struct in_ev *ev, struct tgl_message_media *M) {
} }
return; return;
case tgl_message_media_geo: case tgl_message_media_geo:
mprintf (ev, "[geo] https://maps.google.com/?q=%.6lf,%.6lf", M->geo.longitude, M->geo.latitude); mprintf (ev, "[geo] https://maps.google.com/?q=%.6lf,%.6lf", M->geo.latitude, M->geo.longitude);
return; return;
case tgl_message_media_contact: case tgl_message_media_contact:
mprintf (ev, "[contact] "); mprintf (ev, "[contact] ");

View File

@ -540,8 +540,8 @@ void tglf_fetch_photo_size (struct tgl_photo_size *S) {
void tglf_fetch_geo (struct tgl_geo *G) { void tglf_fetch_geo (struct tgl_geo *G) {
unsigned x = fetch_int (); unsigned x = fetch_int ();
if (x == CODE_geo_point) { if (x == CODE_geo_point) {
G->latitude = fetch_double ();
G->longitude = fetch_double (); G->longitude = fetch_double ();
G->latitude = fetch_double ();
} else { } else {
assert (x == CODE_geo_point_empty); assert (x == CODE_geo_point_empty);
G->longitude = 0; G->longitude = 0;