Skip to content

Commit

Permalink
Fix very long urls not opening
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Oct 9, 2018
1 parent c86db5a commit 7f4c2b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/ExtMath.c
Expand Up @@ -140,4 +140,3 @@ float Random_Float(Random* seed) {
int raw = (int)(*seed >> (48 - 24));
return raw / ((float)(1 << 24));
}

4 changes: 2 additions & 2 deletions src/GraphicsCommon.c
Expand Up @@ -16,7 +16,7 @@ String Gfx_ApiInfo[7] = {

void GfxCommon_Init(void) {
GfxCommon_quadVb = Gfx_CreateDynamicVb(VERTEX_FORMAT_P3FC4B, 4);
GfxCommon_texVb = Gfx_CreateDynamicVb(VERTEX_FORMAT_P3FT2FC4B, 4);
GfxCommon_texVb = Gfx_CreateDynamicVb(VERTEX_FORMAT_P3FT2FC4B, 4);

uint16_t indices[GFX_MAX_INDICES];
GfxCommon_MakeIndices(indices, GFX_MAX_INDICES);
Expand Down Expand Up @@ -60,7 +60,7 @@ void GfxCommon_Draw2DFlat(int x, int y, int width, int height, PackedCol col) {
VertexP3fC4b verts[4];
VertexP3fC4b v; v.Z = 0.0f; v.Col = col;

v.X = (float)x; v.Y = (float)y; verts[0] = v;
v.X = (float)x; v.Y = (float)y; verts[0] = v;
v.X = (float)(x + width); verts[1] = v;
v.Y = (float)(y + height); verts[2] = v;
v.X = (float)x; verts[3] = v;
Expand Down
2 changes: 1 addition & 1 deletion src/PacketHandlers.c
Expand Up @@ -1077,7 +1077,7 @@ static void CPE_EnvSetMapAppearance(uint8_t* data) {

/* Version 2 */
Env_SetCloudsHeight((int16_t)Stream_GetU16_BE(&data[68]));
int16_t maxViewDist = (int16_t)Stream_GetU16_BE(&data[70]);
int maxViewDist = (int16_t)Stream_GetU16_BE(&data[70]);
Game_MaxViewDistance = maxViewDist <= 0 ? 32768 : maxViewDist;
Game_SetViewDistance(Game_UserViewDistance);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Screens.c
Expand Up @@ -983,7 +983,7 @@ static bool ChatScreen_MouseDown(void* screen, int x, int y, MouseButton btn) {
int chatY = s->Chat.Y + s->Chat.Height - height;
if (!Gui_Contains(s->Chat.X, chatY, s->Chat.Width, height, x, y)) return false;

char textBuffer[TEXTGROUPWIDGET_LEN];
char textBuffer[STRING_SIZE * 4];
String text = String_FromArray(textBuffer);
TextGroupWidget_GetSelected(&s->Chat, &text, x, y);
if (!text.length) return false;
Expand Down

0 comments on commit 7f4c2b1

Please sign in to comment.